abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hello
i have this code trying hide specific sheets but it gives me error run time error 1004 "method visible of object_ worksheet failed " in this line
i truly appreciate if anybody help
i have this code trying hide specific sheets but it gives me error run time error 1004 "method visible of object_ worksheet failed " in this line
VBA Code:
sh.Visible = xlSheetVeryHidden
VBA Code:
Private Sub CommandButton2_Click()
Application.Visible = True
Sheets("micro").Activate
Dim sh As Worksheet
For Each sh In Worksheets(Array("RAW", "Date", "MICC", "REPORT", "LABLE"))
sh.Visible = xlSheetVeryHidden
Next sh
UserForm1.hide
End Sub
Last edited: