Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Initiate Macro via change in drop Down List

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Initiate Macro via change in drop Down List

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
--
Gary''s Student - gsnu2007a


"Sean" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Initiate Macro via change in drop Down List

Thanks Gary, is it possible to call a macro from within, in the
Workseet code (thats already within a standard module)?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Initiate Macro via change in drop Down List

Just did it, simple just quote the macro. Always confused if you can
or cannot call a macro from outside a standard module

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
Recording a macro to change item selected in drop down list Jen Excel Worksheet Functions 2 October 2nd 08 11:37 PM
Initiate a trigger for clearing a list of check boxes? JGarland Excel Worksheet Functions 1 September 18th 08 04:36 PM
How to link macro to change an item in drop-down list Amotif Excel Discussion (Misc queries) 1 May 7th 08 01:55 PM
Run Macro after value change from drop down list tx12345[_16_] Excel Programming 2 March 7th 06 01:36 AM
change info in other cells when i change a number in a drop list? macbr549 Excel Discussion (Misc queries) 2 September 11th 05 02:07 AM


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

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

About Us

"It's about Microsoft Excel"