View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ram Ram is offline
external usenet poster
 
Posts: 138
Default Macro run from if then function

I wasn't using uppercase B in the Target. Address. Now it's working fine.


"ram" wrote:

The code below only runs if the Target.Address = "$A$1" . If i change the
Target.Address to ="$B$1" and make a change to cell B1 the macro won't run.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.Run "Test_Output_file!Macro1"
End If
End Sub

Thanks in advance for any help