ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Running Macro (https://www.excelbanter.com/excel-discussion-misc-queries/150214-running-macro.html)

Naveen

Running Macro
 
am not that familar with VB in Excel, though I could manage to write/copy
the code for running the macro when we give a password in the MSG Box. Here
what like to know is How to make the charaters not to be displayed instead it
should display ****** as usual practice for passwords. I do got some
suggesttions like to user and a text box with th e text box property set to
*, but I like to know how to link the user form to the existing module or new
code for the user form.
Thanks in advance for immediate help.

Toppers

Running Macro
 
Create a Userform (Name set to "Password" for example) with one text box. In
the text box properties set "PasswordChar" to "*". You may want code to
validate the password which would be in the "TextBox1_Change()" routine.

To invoke the Userform, put this in your existing (or new) code:

Password.show vbmodeless

(Vbmodeless allows a userform to be shown when other userforms are
displayed: remove this if not required).

If you need more help, send w/book with details to:

toppers <at NOSPAMjohntopley.fsnet.co.uk

Remove NOSPAM

HTH

"Naveen" wrote:

am not that familar with VB in Excel, though I could manage to write/copy
the code for running the macro when we give a password in the MSG Box. Here
what like to know is How to make the charaters not to be displayed instead it
should display ****** as usual practice for passwords. I do got some
suggesttions like to user and a text box with th e text box property set to
*, but I like to know how to link the user form to the existing module or new
code for the user form.
Thanks in advance for immediate help.


Bob Phillips

Running Macro
 
You need a userform with a textbox as suggested, and a password char
property.

Create a public variable in the existing module, and return the password to
that variable in the TextBox1_AfterUpdate event.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Naveen" wrote in message
...
am not that familar with VB in Excel, though I could manage to write/copy
the code for running the macro when we give a password in the MSG Box.
Here
what like to know is How to make the charaters not to be displayed instead
it
should display ****** as usual practice for passwords. I do got some
suggesttions like to user and a text box with th e text box property set
to
*, but I like to know how to link the user form to the existing module or
new
code for the user form.
Thanks in advance for immediate help.





All times are GMT +1. The time now is 06:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com