Password

P

Param

Hi, I am using macro to display below password input box:
--------------------------------------------------------------------------
Sub open()
myPWD = Application.InputBox("Password Protected! Please Enter Authorized
Password to Continue!")
If myPWD = "123456" Then
Sheets("S1").Select
Else
MsgBox "Wrong Password! Bye!"
End If
End Sub
-------------------------------------------------------------------------
My question: It works fine, but when I type password it not show in *****
but display the number I type. How to change in asterik (*)

TQ
Param
 
M

Mikeopolo

Haven't tested this, suggest use the passwordchar property befor
displaying the inputbox, eg

Application.inputbox.passwordchar="*"

Regards
Mik
 
P

Param

not working, or I dont know how to set the command. pls correct me.

Sub closescreentarget()
Application.InputBox.passwordchar = "*"
myPWD = Application.InputBox("Password Protected! Please Enter Authorized
Password to Continue!")
If myPWD = "ems97188" Then
Dim wbk As Workbook
Workbooks.Open ActiveWorkbook.Path & "\setup.xls"
Else
MsgBox "Wrong Password! Bye!"
End If
End Sub
 
Top