Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnAction & Drop Down List
I have a drop down list in a cell on the worksheet. Once
User makes a selection from the drop down list, I would like Excel to run a Macro based on the Item Selected or at least to know that the User has made a change to the drop down list. Can anyone help me with this code? Thanks in advance. MariaG |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnAction & Drop Down List
If the dropdown you speak of is produced by data validation, you the
Worksheet_change event in versions later than xl97. Otherwise, you if from the forms toolbar, then assign a macro to it, or for a combobox from the control toolbox toolbar, use the click event. -- Regards, Tom Ogilvy "MariaG" wrote in message ... I have a drop down list in a cell on the worksheet. Once User makes a selection from the drop down list, I would like Excel to run a Macro based on the Item Selected or at least to know that the User has made a change to the drop down list. Can anyone help me with this code? Thanks in advance. MariaG |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnAction & Drop Down List
Tom,
Thank you for your response. My Drop Down is produced by Data Validation. I have tried your suggestion with: Private Sub Worksheet_Change(ByVal Target as Range) Target.Font.ColorIndex = 5 End Sub It works when I type<< in a change, but not when I select a different item from the Drop Down List. Any help would be appreciated. Thx MariaG -----Original Message----- If the dropdown you speak of is produced by data validation, you the Worksheet_change event in versions later than xl97. Otherwise, you if from the forms toolbar, then assign a macro to it, or for a combobox from the control toolbox toolbar, use the click event. -- Regards, Tom Ogilvy "MariaG" wrote in message ... I have a drop down list in a cell on the worksheet. Once User makes a selection from the drop down list, I would like Excel to run a Macro based on the Item Selected or at least to know that the User has made a change to the drop down list. Can anyone help me with this code? Thanks in advance. MariaG . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnAction & Drop Down List
Tom,
I did not read your post correctly. I am using Excel 97. Sorry for the inconvenience. I suppose there is no way in Excel 97? Thx. MariaG -----Original Message----- Tom, Thank you for your response. My Drop Down is produced by Data Validation. I have tried your suggestion with: Private Sub Worksheet_Change(ByVal Target as Range) Target.Font.ColorIndex = 5 End Sub It works when I type<< in a change, but not when I select a different item from the Drop Down List. Any help would be appreciated. Thx MariaG -----Original Message----- If the dropdown you speak of is produced by data validation, you the Worksheet_change event in versions later than xl97. Otherwise, you if from the forms toolbar, then assign a macro to it, or for a combobox from the control toolbox toolbar, use the click event. -- Regards, Tom Ogilvy "MariaG" wrote in message ... I have a drop down list in a cell on the worksheet. Once User makes a selection from the drop down list, I would like Excel to run a Macro based on the Item Selected or at least to know that the User has made a change to the drop down list. Can anyone help me with this code? Thanks in advance. MariaG . . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnAction & Drop Down List
If Excel 97, then change is not fired. If excel 2000 or later, then this
should work. In Excel 97, you would need to reference this cell with a formula, then use the calculate event. So the action would happen each time a calculate was performed - a lot of extra cycles, but that is pretty much it. (in xl97, it will work if you type in the dropdown choices directly in the textbox of the validation dialog, but not if you use a range). -- Regards, Tom Ogilvy "MariaG" wrote in message ... Tom, Thank you for your response. My Drop Down is produced by Data Validation. I have tried your suggestion with: Private Sub Worksheet_Change(ByVal Target as Range) Target.Font.ColorIndex = 5 End Sub It works when I type<< in a change, but not when I select a different item from the Drop Down List. Any help would be appreciated. Thx MariaG -----Original Message----- If the dropdown you speak of is produced by data validation, you the Worksheet_change event in versions later than xl97. Otherwise, you if from the forms toolbar, then assign a macro to it, or for a combobox from the control toolbox toolbar, use the click event. -- Regards, Tom Ogilvy "MariaG" wrote in message ... I have a drop down list in a cell on the worksheet. Once User makes a selection from the drop down list, I would like Excel to run a Macro based on the Item Selected or at least to know that the User has made a change to the drop down list. Can anyone help me with this code? Thanks in advance. MariaG . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
drop down list based on other drop down list pick | Excel Discussion (Misc queries) | |||
Drop down list dependant on previous drop down list | Excel Discussion (Misc queries) | |||
Drop down lists that auto create and then filter the next drop down list | Excel Worksheet Functions | |||
Drop Down List choice selecting another drop down list | Excel Worksheet Functions | |||
multiple select from the drop down list in excel. list in one sheet and drop down in | Excel Discussion (Misc queries) |