InputBox hiding password characters

Russell_Leaves

New Member
Joined
May 1, 2015
Messages
19
Hi

Using Excel 2007 and Windows 7.

Is it possible that when you write your password in an InputBox, that stars appear while writing it in the InputBox?

I haven't found a solution that works with 2007.

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Russell_Leaves

New Member
Joined
May 1, 2015
Messages
19
Hi JoeMo

Tried that. Had a sub or function defined error at the following line.

Code:
    lngModHwnd = GetModuleHandle(vbNullString)
Any idea what's happened and how to fix it?

Thanks
 
Upvote 0

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
18,144
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi JoeMo

Tried that. Had a sub or function defined error at the following line.

Code:
    lngModHwnd = GetModuleHandle(vbNullString)
Any idea what's happened and how to fix it?

Thanks

A guess would be you don't have the routine GetModuleHandle in your project.
 
Upvote 0

Russell_Leaves

New Member
Joined
May 1, 2015
Messages
19
ADVERTISEMENT
Hi JoeMo

So I need to do something else than just copying the code from post 2 in the link you gave?

Russell
 
Upvote 0

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
38,154
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
I think it might be easier to create a global variable, then create a UserForm with a TextBox and Button on it, set the TextBox's PasswordChar property to an asterisk and have the button assign the TextBox's Text to the global variable and have your main code pick up the Text from the global variable. And, of course, you main code would handle loading and unloading the UserForm.
 
Upvote 0

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,648
Office Version
  1. 365
  2. 2019
  3. 2013
  4. 2007
Platform
  1. Windows
Aahh....the joys of slow internet....Too fast for me Rick...:pray:
 
Upvote 0

Forum statistics

Threads
1,195,582
Messages
6,010,578
Members
441,557
Latest member
Jbest23

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
Top