Secure one Worksheet only but not the Workbook

  • Thread starter Thread starter Mack
  • Start date Start date
M

Mack

Is there a way to make one worksheet protected so that it can't even be opened without a password. Employees will have access to several worksheets in a workbook, but the results will be summarized on a separate worksheet that will be accessible only to management. How best can I accomplish this? I see that there is a way to make a worksheet invisible, but don't know how to control this. I presume there's some VBA code that could hide and unhide a worksheet protected by a password???
Thanks
Mack
 
You could hide the worksheet, but that won't stop anyone who is really serious
about seeing what you have in the workbook.

Once you open a workbook, then any of Excel's protection schemes are really not
a problem to break. If you have stuff that shouldn't be seen by others, don't
put it in excel (or don't share that workbook).
 
Hi Mack

Try something like

Sub showsheet()
If InputBox("", "Enter password") = "mypassword" Then
If Sheets(2).Visible = xlSheetVeryHidden Then Sheets(2).Visible =
xlSheetVisible: Sheets(2).Select
End If
End Sub

linked to a button on say, Sheets(1)

and include code in ThisWorkbook to ensure Sheets(2) is not visible when
opening the workbook:

Private Sub Workbook_Open()
Sheets(2).Visible = xlSheetVeryHidden
Sheets(1).Select
End Sub

Password-secure the VBAProject to stop anyone looking at the code to find
out what the password is.

HTH
Best rgds
Chris Lav


Is there a way to make one worksheet protected so that it can't even be
opened without a password. Employees will have access to several worksheets
in a workbook, but the results will be summarized on a separate worksheet
that will be accessible only to management. How best can I accomplish this?
I see that there is a way to make a worksheet invisible, but don't know how
to control this. I presume there's some VBA code that could hide and unhide
a worksheet protected by a password???
Thanks
Mack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top