MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Run macro if specific cell changes


Posted by Phil Ridley on February 13, 2002 11:04 PM

Hi all,
I am trying to create a macro that when a specific cells change it executes another macro. So far I have this :

Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range) '
Select Case Target.Cells
Case Is = D4
Some_other_Macro
Case is = F6
Another_Macro
<AND SO ON>
End Select
End Sub

Any help is appreciated.


Posted by Bruno on February 14, 2002 12:02 AM

Hi Phil, try this :

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Select Case Target.Address
Case Is = "$D$4"
Some_other_Macro
Case Is = "$F$6"
Another_Macro
End Select

End Sub


Bruno
-----

Posted by Phil Ridley on February 14, 2002 12:33 AM

Thanks for the solution ! n/t