简体   繁体   中英

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. 在此处输入图片说明 ______ 在此处输入图片说明

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

在此处输入图片说明

You workbook is protected.

在此处输入图片说明

在此处输入图片说明

Unprotect your workbook structure before changing the sheets' visibility.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM