tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,825
- Office Version
- 365
- 2019
- Platform
- Windows
My workbook, called Protectedwb, contains a number of very hidden worksheets.
This workbook also has a password to protect the VBA code.
I want to prevent users from unhiding all the worksheets.
Despite not knowing the names of the very hidden worksheets (because the code is password protected), it seems it is still possible to unhide those worksheets, as follows:
1. Open Protectedwb
2. Open a new workbook
Add this code to the new workbook:
Is there a more secure way to prevent this?
This workbook also has a password to protect the VBA code.
I want to prevent users from unhiding all the worksheets.
Despite not knowing the names of the very hidden worksheets (because the code is password protected), it seems it is still possible to unhide those worksheets, as follows:
1. Open Protectedwb
2. Open a new workbook
Add this code to the new workbook:
Code:
Dim wb As Workbook
Set wb = Workbooks("Protectedwb.xlsm")
Dim ws As Worksheet
For Each ws in wb.Worksheets
ws.Visible = xlVisible
Next ws
Is there a more secure way to prevent this?