Password character hide

Romanpete

New Member
Joined
Aug 16, 2014
Messages
2
I want to create a macro that can accept a string in a form but hide the entered characters as they are typed. Essentially just like a normal log in, can't seem to find how in vba. Thx
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I had the same question at one time and the answer is you need to create a user form, the standard input box will not work. You create a text box on the form in which to enter the password. When you look under the properties for the textbox you will see a box labeled PasswordChar and you pick a character. For mine I picked * and when you type the password that is the character that shows up.
 
Upvote 0
I had the same question at one time and the answer is you need to create a user form, the standard input box will not work. You create a text box on the form in which to enter the password. When you look under the properties for the textbox you will see a box labeled PasswordChar and you pick a character.
You do not necessarily have to use a user form for that functionality (it probably makes for a neater user interface if you do though), an ActiveX TextBox placed on a worksheet (maybe hidden/unhidden as needed) could also be used because it too has the PasswordChar property.
 
Upvote 0
You do not necessarily have to use a user form for that functionality (it probably makes for a neater user interface if you do though), an ActiveX TextBox placed on a worksheet (maybe hidden/unhidden as needed) could also be used because it too has the PasswordChar property.


Rick thanks for sharing that. I know when I wanted to do this I searched through many threads and this was not mentioned once, it was always you have to make a user form.
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,928
Members
452,366
Latest member
TePunaBloke

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