98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Switch Clearing
Switch Clearing
Resolved · Low Priority · Version 2003
James has attended:
Excel VBA Intro Intermediate course
Access Intermediate course
Switch Clearing
When I select a salesperson or Manufacturer to run a form on, it is still possible to change the first drop down box and the salesperson or Manufacturer remains.
If I click "Go" at this stage, the wrong programme runs.
Is there any way to clear the second drop down box as soon as the value in the second is changed?
RE: Switch Clearing
Hi James
Thanks for your question
You need to create a change event for the first combo box. In that event you need one line of code
me.cmbreptype.value = ""
This will remove the entry, the entry in the selection combo, the instant you change the entry in the reptype combo.
The afterupdate method doesn't fire until you click on another control, and this is the reason it wasn't working from there
Regards
Stephen
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Colouring cells containing formulasCells in a worksheet can contain values or they can contain formulas. You may wish to identify all the cells in your worksheet that contain formulas by colouring those cells. |