Password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Haven't tested this, suggest use the passwordchar property befor
displaying the inputbox, eg

Application.inputbox.passwordchar="*"

Regards
Mik
 
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
 

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

Similar Threads

Macro target to MsWord 1
How to Unlock Worksheets with a Macro? 6
Help with VB Script 4
Problem with password security 8
Spell Check 3
Edit REplace String 2
Excel Excel macro and passwords 3
Protection Macro 4

Back
Top