Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Worksheet Change in Excel 97 does not run first time


Try the below. Right click the sheet tabViewCode and paste the below

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1")) Is Nothing _
Then Application.Run "HideRows"
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Monk" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i get the date and time if a change is done in a worksheet srini Excel Discussion (Misc queries) 2 February 16th 10 02:41 AM
Worksheet change time format KiwiGirl Excel Programming 6 September 18th 08 11:22 AM
Time Format on Worksheet Change Pyrite Excel Programming 5 September 10th 08 10:56 AM
Time format via Worksheet Change Pyrite Excel Programming 5 September 9th 08 11:47 AM
how do i change all text case in a given worksheet at one time Debi Excel Worksheet Functions 2 December 1st 06 09:36 PM


All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"