A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
No, there is no way to make a standard input box mask passwords.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using the following code to restrice access to a hidden sheet, pending the correct password being entered. The problem I have is that the password
entered is visable on the screen. How do I block the password from being viewed when entered.
' Wages Macro
'Sub PasswordProtectedMacro()
Dim Password As String
Do Until Password = "edit"
Password = InputBox("Restricted area. Please enter password below", "Password", "????")
If Password = "" Then
Exit Sub
End If
Loop
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
No, there is no way to make a standard input box mask passwords.
Answer accepted by question author
Instead of using Inputbox, create a userform in the Visual Basic Editor with a text box for the password, an OK command button and a Cancel command button.
Set the PasswordChar property of the text box to (for example) *. Users will see **** in the text box, but your code in the On Click event of the OK button can read the value of the text box.
Many thanks for your reply, however I'm not familiar with userforms, is there no easy way or a line I can to the existing code ?