Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 500
  • Last Modified:

Excel: Don't allow user to unhide sheets

I would like to make some hidden worksheets in an Excel file. How do i make it so that a user can't unhide my hidden worksheets?
0
ouestque
Asked:
ouestque
  • 3
3 Solutions
 
Brad Sims, CCNANetwork AdministratorCommented:
I have used the xlSheetVeryHidden property in VBA before and that worked for me.  Do you know how to accomplish this or would you like me to post a sample?
0
 
Brad Sims, CCNANetwork AdministratorCommented:
Just change the sheet name below in quotes.

Sub Test()
Worksheets("Sheet1").Visible = xlVeryHidden

End Sub
0
 
Dave BrettVice President - Business EvaluationCommented:
In short there is no foolproof method to enforce the protection.

You have two options
- VeryHidden (as per comment above)
- Protecting the workbook structure

Both are easily defeated, the first with basic VBA knowledge, the second by trivial code that cracks the password. The sructure protection being a little harder to crak in my view

That said you should use both together.

Cheers

Dave
0
 
Brad Sims, CCNANetwork AdministratorCommented:
Dave is correct.  I should have prefaced my first statement by saying the solution worked for me because my users have no VBA knowledge (other than recording macros).  
0
 
Michael FowlerSolutions ConsultantCommented:
ouestque

1. In the workbook select ALT+F11 to open visual basic editor
2. On the left select the worksheet to be hidden
3. If the properties window is not visible select "View/Properties Window"
4. In the Visible field of the properties window change the value to "2 - xlSheetVeryHidden"
5. Select Tools/VBAProject Properties
6. On the Protection tab sellect "Lock project for viewing" and enter a password

While this is not perfect it will stop the casual user
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now