Not displaying keyed text in an InputBox

u742884

Board Regular
Joined
Jun 23, 2002
Messages
126
I have the following code where I prompt users for a password.

PasswordCheck = InputBox("Only Planners may export plans. Please enter password.", "Merchanise Planning", "****** *******")

Is there a way to not display the text they key in the box on the screen? If someone is looking over their shoulder, they would see the password. I would like it to show *'s like when you log into Windows.

Anyone have any ideas?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Not in an inputBox... you can do some event trapping with a Userform however... but it gets complicated screening for AlphaNumerics versus Backspace or Delete, or Enter.
 
Upvote 0
With a standard inputbox you can't do this.

There are many examples on the web though that use Windows API to do this. eg

If you don't want to try that method you can create your own custom inputbox using a userform.

You can have a textbox for the password and set it's PasswordChar property to *.
 
Upvote 0
Did they add PasswordChar in Excel 2003? I don't remember ever noticing it when I did this (the hard way) some 5 or 6 years ago.
 
Upvote 0
Nope.

I think it's been around since 97, perhaps even earlier.:)

But don't quote me on that, all I know is that I can use it in 2000.:eek:
 
Upvote 0
Nope.

I think it's been around since 97, perhaps even earlier.:)

But don't quote me on that, all I know is that I can use it in 2000.:eek:

In that case I REALLY feel like an idiot :oops: (man I have gotton to use that emotion a lot in the last few days :LOL: )... only inexperience at the time excuses me fro doing this the INCREDIBLY HARD WAY when the easy way was clearly available.

u742884, please ignore everything I posted in my initial reply... it appears that I answerred before doing any research.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,540
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top