I am running the following code to check if a value = 0 is in specific cells. Because this code on all the cells runs each time any cell in the workbook is calculated, the screen flashes. I would like to stop this screen flashing by having the check done only when the specific cells are exited.
Thanks, in advance!
Code
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
If ActiveSheet.Name = "INPUT" Then
Application.ScreenUpdating = False
If Sheets("INPUT").Range("B33").Value = 0 Then
Sheets("INPUT").obIoh.Value = False
End If
If Sheets("INPUT").Range("D33").Value = 0 Then
Sheets("INPUT").obIIoh.Value = False
End If
If Sheets("INPUT").Range("F33").Value = 0 Then
Sheets("INPUT").obIIIoh.Value = False
End If
If Sheets("INPUT").Range("I33").Value = 0 Then
Sheets("INPUT").obIVoh.Value = False
End If
Application.ScreenUpdating = True
Else
Exit Sub
End If
End Sub
Display More