Good Day
I have a question regarding being able to improve the speed of the following code:
Private Sub ToggleButton1_Click()
Application.ScreenUpdating = False
ActiveSheet.Unprotect "password"
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "C O L L A P S E R O W S"
ActiveSheet.Outline.ShowLevels RowLevels:=2
Else
ToggleButton1.Caption = "E X P A N D R O W S"
ActiveSheet.Outline.ShowLevels RowLevels:=1
End If
ActiveSheet.pROTECT "password", DrawingObjects:=False, Contents:=True, Scenarios:=False
ActiveSheet.EnableSelection = xlNoRestrictions
Application.ScreenUpdating = True
End Sub
Is there a way to accelerate the execution by rewriting it somehow?
Thanks in advance!
Bookmarks