Input box used as password input

G

Guest

I am currently using an input box for password protection to allow a user to
perform a function, that I want to be limited, via a button, assuming the
input password is correct. Example, you press a button and an input box
prompts you for a password to access the data you are requesting. The
question is can I change the input text the user types in the input box for
the "password" to display "*" characters for every input character, like you
would normally see in a password input field? Thanks.
 
J

JE McGimpsey

For that you'd need to use a UserForm. A Textbox control that you put on
the form has a property, PasswordChar that you can set to mask your
input.
 
G

Guest

Chad,

You can't asterisk out the inputs on a standard VBA input box (As far as I
know).

The easiest way to do this is to design your own, small, user form to ask
for the password, you can easily make it look like the a standard input box.

If you then select the textbox you have used to collect the password, and
select properties.
The is a property call 'Password Char', this is the mask that you want so
enter an * in this property and the input will now be kept hidden.

You can use all your current code with this form, so it shouldn't be any
extra work on top of what you've already done, with the exception of
designing the input form.

Neil
www.nwarwick.co.uk
 
G

Guest

Thanks for all of your feedback. Can any of you please give me a simple
example of this user form code. Also, how do I reference the userform when I
want to prompt for the password? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top