switch clearing

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Switch Clearing

Switch Clearing

resolvedResolved · 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 courses

 

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Colouring cells containing formulas

Cells 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.

Follow these steps:
1. Choose Edit > Go To menu, or press either F5 or Ctrl+G. Excel displays the Go To dialog box.
2. Click Special. Excel displays the Go To Special dialog box.
3. Select the Formulas radio button option.
4. Select OK.

At this point, every formula cell in the worksheet is selected, and those cells can be coloured formatted as desired.

View all Excel hints and tips


Server loaded in 0.07 secs.