View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Password style character masking

The easiest way is to use a Text Box from the control toolbox (not the forms
toolbar as it does not have the Password Character property) and place it on
your sheet somewhere. Right click on the Text Box and select properties. One
fo the properties is PasswordChar. Place an astrisks in this property and you
are good to go... if you want you can link the text box to a cell in a very
hidden sheet or just store the value in a variable somewhere in your code. My
preference is the second option as I don't like to physically store passwords
since XL security is not exactly robust.
--
HTH...

Jim Thomlinson


"Chrisso" wrote:

Hi All

Currently I have an Excel system that requires the user to enter a
password. I dont mean at open time or to unprotect the sheet but just
to kick off some other logic.

Therefore the user enters their password into a cell that my code then
reads. The problem is hiding what the user types into this cell so
that no-one looking over their shoulder can see the password.

I have effected this currently by hiding the formulae bar and by
blocking the view of the actual cell by pasting a blank picture in
front of it so it is obscured. This is a fine solution to me but some
users *really* dont like the fact that they cant see that the cell is
selected and that they are typing in it. They want similar
functionality to any other password screen that shows asterisks (*) as
they type in their password.

Is it possible to effect this? My solution falls down as I could only
do this if there was an event on key stroke - which there is not (I
believe). If there was such an event I could display as many asterisks
as keystrookes in another visible cell.

Any ideas of how I could do this? Perhaps I am barking up the wrong
tree and should do this with forms. Can form controls mask the
inputted characters in this manner?

Any ideas would be appreciated. Thanks in advance,
Chrisso