Password security

B

Blue

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top