Password input textbox

AJ

Active Member
Joined
Mar 4, 2002
Messages
478
Hi everyone,

Thanks in advance to anyone who can help here...

I have a userform in a workbook where I want the user to enter a username and password before the macro then goes and does it's funky stuff.
When they enter the password I want to show an asterisk for each character, rather than what they're entering (i.e. as you would expect.

How do I set such a textbox up?

Many thanks

AJ
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Set the PasswordChar of that TextBox to "*".

That can be done manually from the properties Window of the TextBox or by code like:

UserForm1.TextBox1.PasswordChar = "*"

change the UserForm1 and TextBox1 to whatever you have named those things.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

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