Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
drop down list based on other drop down list pick Ruth Excel Discussion (Misc queries) 1 August 25th 09 04:12 PM
Drop down list dependant on previous drop down list Tenacioushail Excel Discussion (Misc queries) 1 July 1st 08 11:35 AM
Drop down lists that auto create and then filter the next drop down list [email protected] Excel Worksheet Functions 2 September 30th 07 11:53 AM
Drop Down List choice selecting another drop down list CVD0722 Excel Worksheet Functions 3 October 31st 06 01:02 PM
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 06:55 PM


All times are GMT +1. The time now is 01:59 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"