mike_ate_a_pie
Board Regular
- Joined
- Sep 25, 2009
- Messages
- 69
I have the following code that hides any row within the range that is zero. However, there is a around a 10 second delay when clicking onto the sheet. I have tried using screen updating but there is still this delay. Does anyone know what i can do to avoid this.
Thanks
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.ScreenUpdating = False
Dim arrSheets()
Dim lngRowNum As Long
arrSheets = Array("Bold", "Heatons")
If Not IsError(Application.Match(Sh.Name, arrSheets, 0)) Then
For lngRowNum = 6 To 55
Rows(lngRowNum).Hidden = Cells(lngRowNum, 45).Value = 0
Next lngRowNum
End If
Application.ScreenUpdating = True
End Sub
Thanks
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.ScreenUpdating = False
Dim arrSheets()
Dim lngRowNum As Long
arrSheets = Array("Bold", "Heatons")
If Not IsError(Application.Match(Sh.Name, arrSheets, 0)) Then
For lngRowNum = 6 To 55
Rows(lngRowNum).Hidden = Cells(lngRowNum, 45).Value = 0
Next lngRowNum
End If
Application.ScreenUpdating = True
End Sub