Hello Excel expert!
I came up with this group because I can find my solution through google. I have a workbook-protected STRUCTURE and I also have a macro that hides and unhides one worksheet.
When I run the macro to hide/unhide a sheet an error pop up. I hope you could help me with this. below is the screenshot for your reference. below is my hide/unhide code.
Sub Unhide_SD_Sheet()
If Sheet2.Visible Then Sheet2.Visible = xlSheetHidden Else: Sheet2.Visible = xlSheetVisible
If Sheet2.Visible Then MsgBox ("Supporting Documentation Sheet Now Visible") Else MsgBox ("Supporting Documentation Sheet Now Hidden")
End Sub
I came up with this group because I can find my solution through google. I have a workbook-protected STRUCTURE and I also have a macro that hides and unhides one worksheet.
When I run the macro to hide/unhide a sheet an error pop up. I hope you could help me with this. below is the screenshot for your reference. below is my hide/unhide code.
Sub Unhide_SD_Sheet()
If Sheet2.Visible Then Sheet2.Visible = xlSheetHidden Else: Sheet2.Visible = xlSheetVisible
If Sheet2.Visible Then MsgBox ("Supporting Documentation Sheet Now Visible") Else MsgBox ("Supporting Documentation Sheet Now Hidden")
End Sub