LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Testing a sheet for a change since last accessed

Hi Breck,

For each sheet with detail try something like this:

Public blnChanged As Boolean
Public intShowRows As Integer

Private Sub Worksheet_Activate()
If blnChanged Then
MsgBox "There are new rows"
Application.ScreenUpdating = False
Range("AI1:AI262").AutoFilter Field:=1, Criteria1:="<" & CStr
(intShowRows)
Application.ScreenUpdating = True
blnChanged = False
Else
Application.ScreenUpdating = False
Range("AI1:AI262").AutoFilter Field:=1, Criteria1:="<0"
Application.ScreenUpdating = True
End If
End Sub

On the main sheet try:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$3" Then
Sheet2.blnChanged = True
Sheet2.intShowRows = Target.Value
End If

If Target.Address = "$B$4" Then
Sheet3.blnChanged = True
Sheet3.intShowRows = Target.Value
End If

' Continued for each detail sheet
End Sub

HTH,

Wouter
 
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
Testing for empty sheet Stu W Excel Programming 2 July 4th 07 09:28 PM
testing whether a sheet is present Jeff Excel Programming 3 August 14th 05 04:07 PM
popup note when a sheet is accessed M.Siler Excel Discussion (Misc queries) 5 July 19th 05 11:53 AM
testing if a sheet is protected John Wilson Excel Programming 0 September 9th 03 07:21 PM
Testing to see if a sheet name exists anita Excel Programming 1 September 4th 03 10:14 PM


All times are GMT +1. The time now is 11:21 PM.

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

About Us

"It's about Microsoft Excel"