ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Password style character masking (https://www.excelbanter.com/excel-programming/394282-password-style-character-masking.html)

Chrisso

Password style character masking
 
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


XP

Password style character masking
 

I appreciate your concern for simplicity, as do I.

I'm sure someone on this forum will suggest something better than this, but
a simple work around might be to set the background color and font color to
white in the password cell (don't forget to delete the contents once it's
retrieved though).

The user would see the cursor moving, but not see anything in the
cell...same effect really, but alas, no asterisks...

HTH

"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



Jim Thomlinson

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



Chrisso

Password style character masking
 
On 27 Jul, 16:28, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
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- Hide quoted text -


- Show quoted text -


Thanks XP & Jim. You have helped me solve my problem. Cheers Chrisso


Chrisso

Password style character masking
 
On 27 Jul, 16:28, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
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- Hide quoted text -


- Show quoted text -


Hi Jim

I chose to implement the password enter through the ext box as
suggested. The problem I now have is that I cannot tell when the user
hits "enter" after typing in their (nicely hidden) password.

The TextBox control does not seem to have an event that will capture
the "Enter" as the Help file for the KeyPress event states:
A KeyPress event does not occur under the following conditions:
Pressing TAB.
Pressing ENTER.

I dont see any other event that will tell me when the user hits
enter.

Of course, I could stick a command button next to the testbox that
says "OK" but I would prefer, if possible, to capture the "Enter" and
go - this is what users expect and means they can spend as little time
as possible on the password.

Are you aware of a way for me to capture the "Enter"?

Cheers
Chrisso








All times are GMT +1. The time now is 01:17 PM.

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