Run Macro from multiple drop downs & error if drop downs filled in incorrect order

audreylynn

New Member
Joined
Jan 24, 2018
Messages
1
I was unable to come up with a way to run a macro based on input from TWO drop down menus simultaneously. (if only one option chosen, no macro would run, BOTH actions have to occur before macro runs)

I have set a macro to run once user makes selection from first drop down and Macro1 runs and then the user makes a selection from second drop down and Macro2 runs. This order of operations is important. The second drop down selection cannot be made before the first drop down selection. Is there a way to code a msgbox to appear if user chooses value from second drop down menu before choosing value from first drop down menu?

TIA
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Just thinking out loud, I haven't tried it, but how about this?
- in Workbook_Open, define a variable and set the value to zero
- as part of Macro1, running after you select the first drop-down, change that variable to something other than zero
- in Macro2, add a condition that checks if the variable is still zero. If it is then abandon ship, because you know Macro1 has not been run.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top