View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
blue blue is offline
external usenet poster
 
Posts: 12
Default 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