Do your own form named frmPassword.
Dim frmPass as frmPassword
Dim strPassWord As String
.....
Set frmPass = New frmPassWord
strPassWord = frmPass.GetPassword
if Len(strPassWord) then
....cancel out
End if
Put a label, textBox, and two buttons labeld OK and Cancel on the form.
The form contains one function and two subs.
Public Function GetPassword(Optional ByVal Prompt As String = ""

As String
lblPassword = Prompt
txtPassword.Passwordchar="*"
Me.Show vbModal ' Modal form, wait for Hide
GetPassword = txtPassword
Unload Me
End Function
Private Sub cmdOK_Click()
Me.Hide ' Release modal
End Sub
Private Sub cmdCancel_Click()
txtPassword = ""
Me.Hide ' Release modal
End Sub
Then in the calling form get the password with
Dim frmPass as frmPassword
Dim strPassWord As String
.....
Set frmPass = New frmPassWord
strPassWord = frmPass.GetPassword("Enter your password"

if Len(strPassWord) then
....cancel out ' nothing entered
End if
Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript