I need to make 2 sheets in my workbook hidden and only appear with a password.

huntert

New Member
Joined
Feb 7, 2013
Messages
2
I am using Excel 2003.

I have a workbook with about 20 sheets in it.
1. I would like the workbook to always open up with the first 2 sheets hidden.
2. I would like an administrator to be able to unhide those sheets, when prompted for a password to unhide.
3. After the administrator edits and saves and passes it to a normal user. When the normal user opens the file those 2 sheets should be hidden again.

Being able to set a different password for each sheet would be the best case, but if it can only be one password that is fine too.

I am assuming some VBA code is going to be necessary because excel lets you easily hide and unhide sheets and then lock the workbook but this doesn't do it for my situation. I need each sheet to have its own password and always be hidden by default so the administrator doesn't always have to rehide save and pass.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
The below code works amazing. But it only minimizes the sheet and asks for a password. I need it to actually completely lock the sheet where no one can see it unless they have the password.

Private Sub Worksheet_Activate()
ActiveWindow.WindowState = xlMinimized
If InputBox("Enter Password for this sheet") <> "ABC" Then Sheets("Cust. Pricing").Activate
ActiveWindow.WindowState = xlMaximized
End Sub
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top