#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Tab password to view

Hi
I am trying to put a password onto a tab so that when i select it, i cant
see it until i enter a password. There is a solution that i have found on
this group but for some reason cant get it to work for me. When i click my
worksheet (Data) it asks for a password..... so far so good, but when i enter
the password it doesnt show me the (data) sheet, just selects another one! Im
not sure where im going wrong. My work sheets are named "Data" "Printable
graphs 1" and "Printable graphs 2" if this helps.... i would like my password
to be "xxx" Thanks in advance.
This is what i tried to adapt and use

Private Const Password As String = "DoubleOhSeven"

Private Sub Worksheet_Activate()
Me.Visible = False
If InputBox("Please Enter the Password for the " _
& Me.Name & " Sheet", "Enter Password") _
< Password Then
Me.Visible = False
Else
Me.Visible = True
End If
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Tab password to view

Try this

Private Const Password As String = "DoubleOhSeven"

Private Sub Worksheet_Activate()
Application.EnableEvents = False
Me.Visible = False
If InputBox("Please Enter the Password for the " _
& Me.Name & " Sheet", "Enter Password") < Password Then
Me.Visible = True
Else
Me.Visible = True
Me.Select
End If
Application.EnableEvents = True
End Sub


Mike

"jackrobyn1" wrote:

Hi
I am trying to put a password onto a tab so that when i select it, i cant
see it until i enter a password. There is a solution that i have found on
this group but for some reason cant get it to work for me. When i click my
worksheet (Data) it asks for a password..... so far so good, but when i enter
the password it doesnt show me the (data) sheet, just selects another one! Im
not sure where im going wrong. My work sheets are named "Data" "Printable
graphs 1" and "Printable graphs 2" if this helps.... i would like my password
to be "xxx" Thanks in advance.
This is what i tried to adapt and use

Private Const Password As String = "DoubleOhSeven"

Private Sub Worksheet_Activate()
Me.Visible = False
If InputBox("Please Enter the Password for the " _
& Me.Name & " Sheet", "Enter Password") _
< Password Then
Me.Visible = False
Else
Me.Visible = True
End If
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to turn off Page Layout View as default view Colin Halliday New Users to Excel 3 October 12th 07 02:37 AM
Password protect for view only Kathy Excel Discussion (Misc queries) 2 April 5th 06 05:04 PM
Password Required to View\edit a Sheet in a Workbook with Many She Ed Excel Discussion (Misc queries) 1 March 27th 06 09:31 PM
Password visible if user selects "view code" kcdonaldson Excel Worksheet Functions 2 December 3rd 05 03:48 PM
is there anyway to make it so the users of my excel spread sheet cant view the macro code w/o a password? Daniel Excel Worksheet Functions 2 June 28th 05 05:34 AM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"