Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Password security
Hi,
I have a macro for protecting sheets & the ability to run the macro is password protected. Is there any way i can program it so that when i type in the password people cannot see the letters i am typing? The macro code is as below: ub ProtectAll() Dim sPassword As String sPassword = "LMW5487" If Application.InputBox( _ Prompt:="Please enter the password", _ Title:="Password", _ Type:=2) < sPassword Then MsgBox "Wrong password!" Exit Sub End If Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Protect Password:="LMW5487", DrawingObjects:=False, Contents:=True, Scenarios:= _ True, AllowFormattingCells:=True, AllowSorting:=True, AllowDeletingRows:=True, AllowInsertingRows:=True, AllowFormattingRows:=True, AllowFiltering:= _ True, AllowFormattingColumns:=True Next ws End Sub -- Lois |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Password security
Not if you use an inputbox.
But you could design your own userform and use the passwordchar property to hide the input. Debra Dalgleish has some getstarted instructions for userforms at: http://contextures.com/xlUserForm01.html Blue wrote: Hi, I have a macro for protecting sheets & the ability to run the macro is password protected. Is there any way i can program it so that when i type in the password people cannot see the letters i am typing? The macro code is as below: ub ProtectAll() Dim sPassword As String sPassword = "LMW5487" If Application.InputBox( _ Prompt:="Please enter the password", _ Title:="Password", _ Type:=2) < sPassword Then MsgBox "Wrong password!" Exit Sub End If Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Protect Password:="LMW5487", DrawingObjects:=False, Contents:=True, Scenarios:= _ True, AllowFormattingCells:=True, AllowSorting:=True, AllowDeletingRows:=True, AllowInsertingRows:=True, AllowFormattingRows:=True, AllowFiltering:= _ True, AllowFormattingColumns:=True Next ws End Sub -- Lois -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Security & password protection | Excel Discussion (Misc queries) | |||
Password protected document with new level of security for Office | Excel Discussion (Misc queries) | |||
The password option is grayed out under the Security tab | Excel Discussion (Misc queries) | |||
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) |