Hi,
I'm working on the below code with button. How do I remove error by code when the button for hiding has already been used and then an error will prompt if you click the button again
Sub Hide()
'
' Hide Macro
'
'
Sheets(Array("....", "....", "....", "....", "....", "....")) _
.Select
Sheets("Travel").Activate
ActiveWindow.SelectedSheets.Visible = False
On Error Resume Next
Worksheets("Summary").Activate
End Sub
I'm working on the below code with button. How do I remove error by code when the button for hiding has already been used and then an error will prompt if you click the button again
Sub Hide()
'
' Hide Macro
'
'
Sheets(Array("....", "....", "....", "....", "....", "....")) _
.Select
Sheets("Travel").Activate
ActiveWindow.SelectedSheets.Visible = False
On Error Resume Next
Worksheets("Summary").Activate
End Sub
Last edited: