Hi all,
Is there a better code for hiding rows based on 1 criteria when the check box is marked? Below is what I have and it takes close to a minute to cycle through:
Sub CheckBox1_Click()
'"Hide unused plans" on Medical FI sheet
If Range("S1").Value = "True" Then
Call Hide
ElseIf Range("S1").Value = "False" Then
Call Unhide
Else
Return
End If
End Sub
Sub Hide()
'Hides unused plans on Medical FI sheet
Application.ScreenUpdating = False
Application.Calculation = xlManual
Dim c As Range
For Each c In Range("N29:N210,N220:N375,N539:N720,N923:N1104,N1114:N1295")
If c.Value = "" Then Rows(c.Row).Hidden = True
Next
Range("A25").Select
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub
Thanks, Lisa116
Is there a better code for hiding rows based on 1 criteria when the check box is marked? Below is what I have and it takes close to a minute to cycle through:
Sub CheckBox1_Click()
'"Hide unused plans" on Medical FI sheet
If Range("S1").Value = "True" Then
Call Hide
ElseIf Range("S1").Value = "False" Then
Call Unhide
Else
Return
End If
End Sub
Sub Hide()
'Hides unused plans on Medical FI sheet
Application.ScreenUpdating = False
Application.Calculation = xlManual
Dim c As Range
For Each c In Range("N29:N210,N220:N375,N539:N720,N923:N1104,N1114:N1295")
If c.Value = "" Then Rows(c.Row).Hidden = True
Next
Range("A25").Select
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub
Thanks, Lisa116