Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Application.Run .Value End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- __________________________________ HTH Bob "OsmoseTom" wrote in message ... I have a data validation list in cell B2. The list consists of two choices (Year, Month). Based on the users selection I would like to run a macro. The maros are named Year and Month. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Create a macro from drop down list (Validation List) in excel | Excel Programming | |||
Macro list in Tools - Macro | Excel Programming | |||
Display a macro at top of macro list? | Excel Programming | |||
How to create a macro that compares a list to another list | New Users to Excel | |||
Show Macro list (tools-macro-macros) | Excel Programming |