Inputbox password mask

G

Guest

Im using this piece of coding to password protect a form, however when the
password is input it is not masked so everyone around can see it, is there
anyway of adding an Input mask to an Input box?

private Sub Form_Open(Cancel As Integer)

Dim Password, Pword
Password = "monkey"
Pword = InputBox("Please Enter Your Password", "Enter Password")
If Pword <> Password Then
MsgBox "Sorry, incorrect password"
End
End If
End Sub
 
B

Brian

bobster said:
Im using this piece of coding to password protect a form, however when the
password is input it is not masked so everyone around can see it, is there
anyway of adding an Input mask to an Input box?

private Sub Form_Open(Cancel As Integer)

Dim Password, Pword
Password = "monkey"
Pword = InputBox("Please Enter Your Password", "Enter Password")
If Pword <> Password Then
MsgBox "Sorry, incorrect password"
End
End If
End Sub

No. You'll have to create a pop-up form that mimics the input box. You
will then be able to set the InputMask property of the password text box to
display asterisks.
 

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