Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can you help please?
To password protect a worksheet I am using the following code: Private Sub Worksheet_Activate() 'password protect your VBA project Dim strPassword As String On Error Resume Next Const Password = "dafydd" Me.Protect Password:=Password Me.Columns.Hidden = True strPassword = InputBox("Enter password to view this sheet") If strPassword = "" Then Me.Previous.Select Exit Sub ElseIf strPassword < Password Then MsgBox "Password Incorrect", , "Wrong password" Me.Previous.Select Exit Sub Else Me.Unprotect Password:=Password Me.Columns.Hidden = False End If On Error GoTo 0 End Sub Private Sub Worksheet_Deactivate() On Error Resume Next Me.Columns.Hidden = True On Error GoTo 0 End Sub Is there a way I can adjust the code so that the password doesn't actually show when it is typed? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Password | Excel Discussion (Misc queries) | |||
password | Excel Discussion (Misc queries) | |||
How to see macro code of a password protected macro without a password? | Excel Worksheet Functions | |||
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. | Excel Worksheet Functions | |||
bypass password when update linking of password protected file | Excel Discussion (Misc queries) |