jimmywanna
Board Regular
- Joined
- Mar 18, 2002
- Messages
- 182
I have a macro which runs to make the user enter a password after a control button is pushed. It works perfectly, my only problem is when the password is entered the text being typed is visible. Is there any way of the text appearing as "******" or "XXXXXXX" so as anyone around cannot see the password?
thanks in advance guy's
jim
here is the macro:
Sub UNHIDEFORM()
'
' UNHIDEFORM Macro
' Macro recorded 30/01/2004 by gibsonj
'
'
Dim Pass, Msg As String
Dim Ans As Byte
Msg = "Wrong Password" & vbCrLf
Msg = Msg & "Try Again ?"
Password = "PRESLEY" ' Case sensitive
Pass = "xxx"
Do Until Pass = Password
Pass = InputBox("Enter Password", "Password")
If Pass = "" Then ActiveWorkbook.Close SaveChanges:=False
If Pass <> "PRESLEY" Then Ans = MsgBox(Msg, vbCritical + vbYesNo, "Password")
If Ans = vbNo Then ActiveWorkbook.Close SaveChanges:=False
Loop
Range("A1").Select
Columns("B:J").Select
Selection.EntireColumn.Hidden = False
Range("E2:F2").Select
End Sub
thanks in advance guy's
jim
here is the macro:
Sub UNHIDEFORM()
'
' UNHIDEFORM Macro
' Macro recorded 30/01/2004 by gibsonj
'
'
Dim Pass, Msg As String
Dim Ans As Byte
Msg = "Wrong Password" & vbCrLf
Msg = Msg & "Try Again ?"
Password = "PRESLEY" ' Case sensitive
Pass = "xxx"
Do Until Pass = Password
Pass = InputBox("Enter Password", "Password")
If Pass = "" Then ActiveWorkbook.Close SaveChanges:=False
If Pass <> "PRESLEY" Then Ans = MsgBox(Msg, vbCritical + vbYesNo, "Password")
If Ans = vbNo Then ActiveWorkbook.Close SaveChanges:=False
Loop
Range("A1").Select
Columns("B:J").Select
Selection.EntireColumn.Hidden = False
Range("E2:F2").Select
End Sub