Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to run code based on a dropdown form changing?
I've used the validation dropdowns before but prefer the VBA for because it automatically has the down arrow next it. The validatio dropdown only shows an arrow when it is selected. I would like to run some code based on the selection chosen in th dropdown form (which is inserted into the spreadsheet) when th selection is changed. Any assistance would be greatly appreciated -- PropKi ----------------------------------------------------------------------- PropKid's Profile: http://www.excelforum.com/member.php...fo&userid=1013 View this thread: http://www.excelforum.com/showthread.php?threadid=27136 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to run code based on a dropdown form changing?
Use the ListIndex value of the ListBox. eg if there are four items in your
list, then they have a list index number that starts with 0: 0, 1, 2, 3. The code would look like this: If ListBox1.ListIndex = 0 Then macro_name1 If ListBox1.ListIndex = 1 Then macro_name2 'etc for each item you want to run a macro Mike F "PropKid" wrote in message ... I've used the validation dropdowns before but prefer the VBA form because it automatically has the down arrow next it. The validation dropdown only shows an arrow when it is selected. I would like to run some code based on the selection chosen in the dropdown form (which is inserted into the spreadsheet) when the selection is changed. Any assistance would be greatly appreciated! -- PropKid ------------------------------------------------------------------------ PropKid's Profile: http://www.excelforum.com/member.php...o&userid=10134 View this thread: http://www.excelforum.com/showthread...hreadid=271369 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula (off form) that completes form data based on a result | Excel Worksheet Functions | |||
Dropdown list width changing code | Excel Worksheet Functions | |||
offer dropdown options based on another dropdown | Excel Discussion (Misc queries) | |||
Use dropdown list from Form | Excel Discussion (Misc queries) | |||
Executing code based on changes made to a form ? | Excel Programming |