gimli
11-23-2011, 09:18 AM
Hi all,
Noob question..im would like this sub to run everytime someone clicks on the work sheet tab. I have this code on the object for the sheet. Or any other ideas would be great.
thanks
Option Explicit
Sub HideRowsIfSumZero()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Range("C2.C7:C100")
If UCase(cell.Value) = "0" Then
cell.EntireRow.Hidden = True
End If
Next
Application.ScreenUpdating = True
End Sub
Noob question..im would like this sub to run everytime someone clicks on the work sheet tab. I have this code on the object for the sheet. Or any other ideas would be great.
thanks
Option Explicit
Sub HideRowsIfSumZero()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Range("C2.C7:C100")
If UCase(cell.Value) = "0" Then
cell.EntireRow.Hidden = True
End If
Next
Application.ScreenUpdating = True
End Sub