Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula (off form) that completes form data based on a result lldiel Excel Worksheet Functions 2 November 24th 09 11:09 PM
Dropdown list width changing code XXL User Excel Worksheet Functions 1 June 26th 06 09:11 PM
offer dropdown options based on another dropdown Conor Excel Discussion (Misc queries) 2 January 13th 06 04:28 PM
Use dropdown list from Form Gerrym Excel Discussion (Misc queries) 1 January 4th 05 01:24 PM
Executing code based on changes made to a form ? Dan Thompson Excel Programming 1 September 29th 04 06:51 PM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"