VBA Very hidden worksheet password function not working

Connection78

New Member
Joined
Jul 14, 2021
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
It's been a while since I used VBA's in Excel to get a worksheet to be very hidden and password protected. Last time I was able to do it at my previous employer on my work computer. Now I'm trying to do it on my personal computer.

So here is my case. I want to hide a particular worksheet and when I open VBE I am able to change the visible status of the worksheet to very hidden, no problem with this step. I then open the VBAProject - Project Properties dialogue box and under the protection tab I type in my password and tick the 'lock project for viewing' box and then press OK and close the dialogue box. And as expected this worksheet is now hidden. However, here is the problem. When I go back and change the visible status back to visible, I get my worksheet to show up but it does not require me to type in a password.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi,
You need to save workbook and reload it.
 
Upvote 0
Hm, try changing your password, there seems to be one that doesn't work.
Questions:
1. Is there any code in VBA modules?
2. Whether a password is requested when trying to view the code?
 
Upvote 0
Hm, try changing your password, there seems to be one that doesn't work.
Questions:
1. Is there any code in VBA modules?
2. Whether a password is requested when trying to view the code?
Thanks for the reply,

There's no other VBA code in my file.
 
Upvote 0
Any code is required, just add something like this, save workbook into XLSB or XLSM format and reopen it:
VBA Code:
Private Sub Dummy()
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

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