Font in MsgBox?

C

Charlotte E.

I know there no way to directly change the font used in a MsgBox, but I
figure there might be a workaround?

Someway of reading the font currently being used (some system setting?)
Then set a new font, and show MsgBox.
And, finally set the system font back...

But, which font is used in the MsgBox???
Where to find it?
Maybe someone even know where to change it?


PS: The font I want to use it "Lucida Console", if that helps...


TIA,

CE
 
J

JLGWhiz

To change the font in a Message Box would require getting into Microsoft
source code and that is not a simple workaround. Mike's suggestion is the
best. Put a label on a UserForm and you can make it do whatever you want.
 
J

James Cone

Re: "But, which font is used in the MsgBox???
Where to find it?
Maybe someone even know where to change it?"
'--
Right-click the desktop (windows XP)
Appearance tab
Advanced button
Item dropdown
--
Jim Cone
Portland, Oregon USA
PS: I don't like your font choice <g>




"Charlotte E."
I know there no way to directly change the font used in a MsgBox, but I
figure there might be a workaround?
Someway of reading the font currently being used (some system setting?)
Then set a new font, and show MsgBox.
And, finally set the system font back...
But, which font is used in the MsgBox???
Where to find it?
Maybe someone even know where to change it?
PS: The font I want to use it "Lucida Console", if that helps...
TIA,
CE
 
C

Charlotte E.

Yeps, but as stated, I just wanted to change the font temporary, since I
figured it was a system setting....

Yeps, a userform could do the trick, but if is just some quick feedback, I
really think a userform is shooting birds with a cannon :)

Unfortunately MsgBox cannot really allign feedback, unless you use a fixed
width font, like Lucida Console.

But, temporary changing the font probably need an API function?
And, I'm not really into that part of programming.... :-(

Can anyone help?


TIA,


CE
 
J

JLGWhiz

I have checked other forums and here is one answer that smmarizes most of the
others.

You simply can not.... not without changing the stardard font of windows. A
msgbox is a modal window that uses the stardard windows system font. Period.
I've tried everything known to man to change the font of a msgbox, and it
boils down to having to recode. For the future, something that may save you a
headache, would be to make a normal form, and do the formname.show vbmodal,
and have a label and a button on it. Then, use this form as your msgbox
whenever you need one. This would prevent this problem from happening in the
future. I hate to say it though, but you can't change the font of the msgbox.
 
J

Jim Thomlinson

If all you are looking to do is to align text use vbTab to align the text...

msgBox "This" & vbtab & "1234" & vbcrlf & "Thing" & vbtab & "456"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top