How can I execute a macro right after the user clicks the validation drop down?

M

Michael

I have an Excel worksheet and in $D$1 it has a validation rule (in cell drop
down) that reads allowed values from A1:A3. What I want is when the user
clicks on the drop-down in A1 I want to execute some basic macro. Is their a
dropdown click event where I can capture it so before the user does anything
else I can call my macro?

Thanks in advance
Michael
 
D

Dave Peterson

You might be able to tie into the Worksheet_Change event. It fires when
something is changed on the worksheet (by typing or by data|validation).

There is a bug in xl97 (fixed in xl2k) that caused this event not to fire under
certain circumstances.

Debra Dalgleish explains it here:
http://contextures.com/xlDataVal08.html#Change

You can read more about events at:
Chip Pearson's site:
http://www.cpearson.com/excel/events.htm

David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/event.htm
 
M

Michael

Thanks you so much! This worked like a charm :)

Dave Peterson said:
You might be able to tie into the Worksheet_Change event. It fires when
something is changed on the worksheet (by typing or by data|validation).

There is a bug in xl97 (fixed in xl2k) that caused this event not to fire
under
certain circumstances.

Debra Dalgleish explains it here:
http://contextures.com/xlDataVal08.html#Change

You can read more about events at:
Chip Pearson's site:
http://www.cpearson.com/excel/events.htm

David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/event.htm
 
Top