Solved

Password font in InputBox

Posted on 2001-08-31
13
599 Views
Last Modified: 2013-12-02
Does anyone know how I can use a password font in InputBox so the user sees ********** ?
I don't want to use a dialog box or a custom form, just an InputBox.  A few lines of code changing the default font, or something, will be ok, but please don't go to the trouble of posting a complex solution - this is just a quick question.
If it can't be done, then the first reply wins, but be sure - you wouldn't want to be wrong :)
0
Comment
Question by:DavidWare
  • 5
  • 3
  • 2
  • +2
13 Comments
 
LVL 8

Expert Comment

by:dovholuk
Comment Utility
right click on the text box and choose properties. a new window will pop up. in the tab named "All" find "input mask". type in "Password"

you're box will now only show ******

dovholuk
0
 
LVL 2

Accepted Solution

by:
Gudare earned 25 total points
Comment Utility
Davidware, I believe you're discussing the command in code similar to:

set strPassword = Inputbox("What is your password?")

and this is where you want to change it?

-Craig
0
 

Author Comment

by:DavidWare
Comment Utility

Gudare & dovholuk,

Yes, InputBox in code.

set strPassword = Inputbox("What is your password?")

Sorry for not being clear.


0
 
LVL 2

Expert Comment

by:Yoink
Comment Utility
dovholuk is right on!
0
 
LVL 2

Expert Comment

by:Gudare
Comment Utility
Only one problem with dovholuk's answer, Yoink, is that there is no text box to click on, because there is no form being used, unless dovholuk knows of a way to access the control I'm unfamiliar with.

It's an inputbox, a common control object from M$, and I believe is part of the standard VBA library in references.

Looking into alternatives for you now, David.

-Craig
0
 
LVL 8

Expert Comment

by:dovholuk
Comment Utility
gudare is right on! :)

when i read the question i assumed (i know, i know) that i knew what was being asked... silly me, i should know better... lol

anyway, nope. there's no way to do it without using a customer form that i know of either.

there might be some elaborate API out there that'll monitor the keyboard and change EVERY character to *'s, but if there is, it's certainly not in my knowlege base.

cheers,

dovholuk
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 12

Expert Comment

by:Paurths
Comment Utility
i'd go for dovholuk's suggestion,

create your own form, adjust the mask, etc...

anyway, i'm certainly interested in the solution to change the mask of an inputbox.

my 2 cents, can't be done.
hope i stand corrected.

cheers
Ricky
0
 

Author Comment

by:DavidWare
Comment Utility
Well, I didn't think so, but you guys are really great, so I thought I'd ask.
Gudare seems to have got the point first.  I hope someone knows of a way.
0
 
LVL 2

Expert Comment

by:Gudare
Comment Utility
Hold on, hold on... Looking into methods to mess with the default font that the box will read to work with... It's almost a 99% chance that it's working with something in the default appearance settings and should be callable and settable via WinAPI calls. Messy, nasty, but effective....


*IF* I can find the bugger.

-Craig
0
 
LVL 2

Expert Comment

by:Gudare
Comment Utility
Well....

I bow to mightier minds then I. I must assume it cannot be done due to lack of knowing which @*#&$@#*&$@ font it's using.

It's not using anything through appearance, but most folks Im sure knew that, just did a double check. A few methods I used to attempt to locate the actual font (I was going to pull a font-file switch and just trick the system) failed because I can't figure out which font file it's using.

I give, dovholuk and Paurths are correct. There is no feasible alternative. Use a custom, modal form.

G'luck.

-Craig
0
 
LVL 12

Expert Comment

by:Paurths
Comment Utility
Gudare,
there might exist a method to do it.
I was wishing u would found it, b/c it would have been interesting to know that.

cheers
Ricky
0
 
LVL 2

Expert Comment

by:Gudare
Comment Utility
Ricky -

I'm sure there's a method, M$ had to put it in there in the first place! :)  And trust me, both of us, and my aching head from banging it on the desk, wishes I could have found it. *smirks*  Ah well, try again another day.

-Craig
0
 

Author Comment

by:DavidWare
Comment Utility
Thanks, Craig. Sorry about the lump on your head.
And thanks to all who posted.
If I ever find it, I'll post it here.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now