View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Monk[_2_] Monk[_2_] is offline
external usenet poster
 
Posts: 65
Default Worksheet Change in Excel 97 does not run first time


I am using the following code to run a Macro when there is a change in cell
A1. This works well on excel 2003, however it does not run automatically on
excel 97. If the user changes the value in A1 for a second time in 97 then
the code will work. If you could provide advice on what code would work on
the first change in 97 and later versions it would be appreciated.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("a1")) Is Nothing Then
Exit Sub
Else
Application.Run "HideRows"
End If
End Sub