InputBox password character
Thanks for visiting my site lucky visitor:
This page was last updated on: March 21, 2009
Copyright © 2002. XcelFiles. All Rights Reserved Ivan F Moala
If you have ever wanted to use an InputBox as a password verifier then you would have been disappointed with the fact that the InputBox offers no hidden character for the inputted text
eg see below...............
1) Subclassing
Now, thanks to MrExcel MVP Daniel Klann, this has become possible. My thanks to Dk for allowing me to make this method available. I have amended some of the original code and also made this available for Xl97. Original would only work for Xl2000+.
The result of this is seen below.
To use the above code in your own routines, just export the Module(s)
For the Xl97 Version you need the modules:
For the Xl2000 Version you need to have the Module:
For the XL97+ Version you need all the Modules in the Workbook.
Now all you need to do is call the routine as per standard InputBox Method EXCEPT
instead of InPutBox type in InPutBoxDK eg.
InputBoxDK("Type your password here.", "Password Required")
That's it..................
Amendments made:
1) Simulated Std Input Box properties/Methods
2) Made Xl97 Version.....thanks to the work of Ken Getz & Michael Kaplan
3) Xl97+ Version works with versions of Xl from 97 onwards.
Again, my thanks to DK, I liked this code and the clever use of the APIs used, particularly the
SendDlgItemMessage API
A request has been made to make a version that will work on Xl97 and 2000 or higher. The following workbook should do this.
There are a couple of ways to do this;
1) Subclassing or Hooking