how do i make the input text box text show as *'s when the person typing the passcode in to the input box

Craig_Moore

Board Regular
Joined
Dec 12, 2018
Messages
64
Office Version
  1. 2019
Platform
  1. Windows
Hi All

i have the code below but my boss wants the input box to show ***** when he is putting in the code as he often has to do this in front of staff

please can some one help me

thanks
VBA Code:
Private Sub UNPROTECT_ALL_SHEETS_Click()
Application.ScreenUpdating = False
On Error GoTo WrongPS
unpass = InputBox("Please enter the password:")
For Each Worksheet In ActiveWorkbook.worksheets
Worksheet.Unprotect Password:=unpass
Next
Exit Sub
WrongPS: MsgBox "Please check your password ."
Application.ScreenUpdating = True
End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi All

i have the code below but my boss wants the input box to show ***** when he is putting in the code as he often has to do this in front of staff

Hi this question is often asked & it has been done here: Mask your Password with this VBA InputBox - wellsr.com

You can though, just create your own inputbox using a userform and simply specifying the textbox passwordchar property "*"
one example here may help: Excel Userform Login - Online PC Learning


Dave
 
Upvote 0
Solution
sorry for the delay on reply, thanks for the help, i have gone with the user form
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top