T
TG
Hello,
I have a code:
Private Sub Worksheet_Calculate()
Const MyCells As String = "c8,b55,b56,b57" 'adjust the range to suit
On Error GoTo stoppit
Application.EnableEvents = False
For Each cell In Me.Range(MyCells)
With cell
If .Value = "" Then
.EntireRow.Hidden = True
Else
.EntireRow.Hidden = False
End If
End With
Next
stoppit:
Application.EnableEvents = True
End Sub
That luckily I was able to find in this Forum. The problem is that this code
makes my worksheets run really slow. Every time the macro updates the whole
workbook slows down, I cannot type of make any changes till the macro is done
updating. This sometimes takes up to 5 seconds and makes the screen flickers.
Is there any way to stop the flickering and speed up the process without
compromisisng the code?
Thank you very much,
TG
I have a code:
Private Sub Worksheet_Calculate()
Const MyCells As String = "c8,b55,b56,b57" 'adjust the range to suit
On Error GoTo stoppit
Application.EnableEvents = False
For Each cell In Me.Range(MyCells)
With cell
If .Value = "" Then
.EntireRow.Hidden = True
Else
.EntireRow.Hidden = False
End If
End With
Next
stoppit:
Application.EnableEvents = True
End Sub
That luckily I was able to find in this Forum. The problem is that this code
makes my worksheets run really slow. Every time the macro updates the whole
workbook slows down, I cannot type of make any changes till the macro is done
updating. This sometimes takes up to 5 seconds and makes the screen flickers.
Is there any way to stop the flickering and speed up the process without
compromisisng the code?
Thank you very much,
TG