Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro run from If Then function
The goal is to run 'MacroX' if cell equals Y. Is that even possible?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro run from If Then function
"Nikki" wrote in message ... The goal is to run 'MacroX' if cell equals Y. Is that even possible? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro run from If Then function
HI Nikki,
Add the following code the to Worksheet_Change() event on the worksheet where the cell is located. hth, Rick Private Sub Worksheet_Change(ByVal Target as Range) If Target.address = "$C$4" and Target.Value = "Y" Then ' << Change cell address Call MacroX End If End Sub "Nikki" wrote in message ... The goal is to run 'MacroX' if cell equals Y. Is that even possible |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro run from If Then function
Hi, yes it is possible. Place this in the sheet module for the
worksheet you want to check for 'Y' value: Private Sub Worksheet_Change(ByVal Target as Range) 'Test to see if change ocurred in Cell 'B2' If Target.address(0,0) < "B2" Then exit sub 'Test if Cell B2 = "Y" If Target.value = "Y" Then Call MacroX End Sub HTH-Lonnie M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro with sum function | Excel Worksheet Functions | |||
Not sure what function, macro, etc to use | Excel Worksheet Functions | |||
Sub Macro vrs Function Macro Auto Start | Excel Discussion (Misc queries) | |||
Macro Function | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming |