Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 565
Edward Avatar asked Nov 01 '25 09:11

Edward


1 Answers

You workbook is protected.

enter image description here

enter image description here

Unprotect your workbook structure before changing the sheets' visibility.

like image 92
Harry Lee Avatar answered Nov 03 '25 23:11

Harry Lee