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 |
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 |
All times are GMT +1. The time now is 07:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com