View hidden sheet, Unable to set the visible property of the worksheet class errors

Viewed 3382

I have an excel file with 4 tabs, sheet 1 has all but a few cells protected, sheet 2 was hidden, and sheet 3 was completely password protected. I need to view and edit sheet 2 however unable to do so.

I tried a solution I seen online to go to View, custom view, and add then show. This didn't work.

I will note I see my bottom bar is greyed out, nor am I able to "Insert" sheets from the top Home ribbon. enter image description here ______ enter image description here

I then tried the following VBA macro solution, Sheet2 name = States.

 ActiveWorkbook.Worksheets("States").Unprotect Password:="password"
 ActiveWorkbook.Worksheets("States").Visible = -1
 ActiveWorkbook.Worksheets("States").Visible = False

However I still only get the error "Runtime error '1004': unable to set the visible property of the worksheet class" Even in VBA properties of the sheet, if I try to set it I get the below popup

enter image description here

1 Answers

You workbook is protected.

enter image description here

enter image description here

Unprotect your workbook structure before changing the sheets' visibility.

Related