View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Luke M[_4_] Luke M[_4_] is offline
external usenet poster
 
Posts: 457
Default Multiple Worksheets

Please, please note that Eduardo's code doesn't provide security. Anyone
with a little bit of knowledge of VB will be able to override this code, and
get to the hidden data.

--
Best Regards,

Luke M
"George" wrote in message
...
Thanks so much that is exactly what I wanted to do

"Eduardo" wrote:

Hi,

what you can do is to hide the sheets and then in order to unhide them
each
user will have to enter a password, you will have to copy the code below
in
each worksheet before hidding it, and will have to change the password
for
each one. To copy the password, right click on the mouse in the tab name,
view code and enter this code. In the example below the password is
Manager
and is located in three places, ensure to change it for yours

private Sub Worksheet_Activate()
Dim strPassword As String
On Error Resume Next
Me.Protect Password:="MANAGER"
Me.Columns.Hidden = True

strPassword = InputBox("Enter password to access DATA sheet")

If strPassword = "" Then
ActiveSheet.Visible = False
Worksheets("Menu").Select
Exit Sub
ElseIf strPassword < "MANAGER" Then
MsgBox "Password Incorrect "
ActiveSheet.Visible = False
Worksheets("Menu").Select
Exit Sub
Else
Me.Unprotect Password:="MANAGER"
Me.Columns.Hidden = False
End If
Range("a1").Select

On Error GoTo 0
End Sub

Private Sub Worksheet_Deactivate()
On Error Resume Next
Me.Columns.Hidden = True
On Error GoTo 0
End Sub


"George" wrote:

This is what I want to do I have a workbook with multiple sheets in it
15 to
20 with a master sheet to add up all the data The workbook needs to be
viewed
by several people but I only want each person seeing the data for their
page.
Is there a way to blank out the worksheet then be able to see it if
you have
the password. I do realize that you can just have multiple workbooks
with
the workbooks linked but they are in buildings around the country and
you
can't link workbooks with office live workspace.