Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default prompt password for a worksheet

how can i prompt a user to enter a password when he tries to unhide a
hidden sheet . the workbook has to be password protected i.e when i
open a workbook all the hidden sheets have to be password protected .
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default prompt password for a worksheet

You could re-purpose the unhide worksheet menu option.

How do they unhide, from the menu, or do you have an app doing it.

HTH

Bob

"vicky" wrote in message
...
how can i prompt a user to enter a password when he tries to unhide a
hidden sheet . the workbook has to be password protected i.e when i
open a workbook all the hidden sheets have to be password protected .



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default prompt password for a worksheet

hI,
right click in the tab name, view code, copy the following one

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

Change the password for yours, then hide the sheet, when sheet is going to
be unhide it will ask for the password

if this helps please click yes thanks

"vicky" wrote:

how can i prompt a user to enter a password when he tries to unhide a
hidden sheet . the workbook has to be password protected i.e when i
open a workbook all the hidden sheets have to be password protected .
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default prompt password for a worksheet

Thanks a lot For Replying . i have figured out the logic for that . i
just need a code to hide " Format" Menu tool Bar in excel . i.e user
should not be able to access to this menu .
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default prompt password for a worksheet

Application.Commandbars(1).Controls("Format").Enab led = False

HTH

Bob

"vicky" wrote in message
...
Thanks a lot For Replying . i have figured out the logic for that . i
just need a code to hide " Format" Menu tool Bar in excel . i.e user
should not be able to access to this menu .





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default prompt password for a worksheet

Make the worksheets "veryhidden"

They won't be available under FormatSheetUnhide.


Gord Dibben MS Excel MVP

On Wed, 20 Jan 2010 05:46:54 -0800 (PST), vicky
wrote:

Thanks a lot For Replying . i have figured out the logic for that . i
just need a code to hide " Format" Menu tool Bar in excel . i.e user
should not be able to access to this menu .


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
Prompt for password Tanya Excel Programming 29 June 28th 08 01:04 PM
prompt for password only once Mike Boynton via OfficeKB.com Excel Programming 4 May 27th 05 01:34 PM
Password Prompt Noel Excel Discussion (Misc queries) 0 May 18th 05 07:42 PM
Password Prompt LuhElle Excel Discussion (Misc queries) 1 March 8th 05 11:11 PM
How to prompt user to set password that protects their worksheet? cwwolfdog Excel Programming 2 February 10th 05 02:51 PM


All times are GMT +1. The time now is 02:45 PM.

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

About Us

"It's about Microsoft Excel"