Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Masking user entry in Input Box

Status
Not open for further replies.

Stinney

IS-IT--Management
Nov 29, 2004
2,031
US

Is there a way to mask the entry a user is making in an Input Box?

I wanted to create a keyboard shortcut to unprotect all of the sheets in an Excel file.

It works, but when I enter the password in the Input Box it displays as I type. I don't want it to be displayed as I type.

Any way to have it not show, or mask it with asteriks?

- Stinney

Favorite all too common vendor responses: "We've never seen this issue before." AND "No one's ever wanted to use it like that before.
 
Yep, you can set the PasswordCHar property of the Textbox to an *

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.

 
Hmm, why I read Input box as Textbox I'm not sure... [blush]

As an alternative you could have a userform rather than an inputbox and that would achieve the required functionality.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.

 

Since I'm calling on an already established code, I decided to go a little more low tech. The following will wait 1 second and then send the keys Alt+T+P+P

This will actually call up the Unprotect AND Protect, same as if you were to press Alt T, P, P.

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime

SendKeys "%T {P 2}"

- Stinney

Favorite all too common vendor responses: "We've never seen this issue before." AND "No one's ever wanted to use it like that before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top