![]() |
Input box used as password input
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. |
Input box used as password input
You could use a textbox on a form and set its passworschar to *
"Chad" wrote: 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. |
Input box used as password input
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. In article , "Chad" wrote: 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. |
Input box used as password input
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 "Chad" wrote: 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. |
Input box used as password input
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. "JE McGimpsey" wrote: 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. In article , "Chad" wrote: 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. |
All times are GMT +1. The time now is 05:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com