Initiate Macro via change in drop Down List

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

How can I initiate a Macro when I change a selection from a DV
Dropdown list?

I have a DV Drop down that selects a week, I then have to run a macro
that clears data. Could I in effect join the two together, if so how?


Thanks
 
We can use an event macro:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("B1").Clear
Application.EnableEvents = True
End Sub

If you change A1 (whether by DV or typing) B1 is cleared.

This goes in the worksheet code area, not a standard module
 
Thanks Gary, is it possible to call a macro from within, in the
Workseet code (thats already within a standard module)?
 
Just did it, simple just quote the macro. Always confused if you can
or cannot call a macro from outside a standard module
 
Back
Top