Changing font for msgbox

  • Thread starter Thread starter jeff
  • Start date Start date
J

jeff

Is it possible to change the font of a msgbox? I have one that will
show text plus a cell value. I've tried changing the font of the cell,
but it doesn't change it when it's in the msgbox. I've looked in Help,
and in past posts, but cannot find anything on it. Maybe it can't be
done in VBA.
Thanks
j.o.
 
Easy.

Right-click anywhere on the Desktop and:

Properties > Appearance > Advanced > Message Box > and then pick the font,
size, color, etc.


Then a bunch of O.K.'s
 
You can add a textbox with the message

ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 158.25,
180.75, _
64.5, 37.5).Select
Selection.Characters.Text = "ABC"
With Selection.Characters(Start:=1, Length:=3).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
 
Put simply you can't. You can however design a modal userform with a lable
and CommandButton on it similar to that of a message box and use the
form.show every time you want the message box. then just add me.hide to the
click sub of the command button.
hope this helps.
 
Easy.

Right-click anywhere on the Desktop and:

Properties > Appearance > Advanced > Message Box > and then pick the font,
size, color, etc.

Then a bunch of O.K.'s
--
Gary''s Student - gsnu200905





- Show quoted text -

Thanks. I thought this was going to be just a VBA issue. I've pulled
the Properties box up many times before, and never really noticed the
Appearance settings. The problem is... it changes everything. Even the
icon tray. But, I really appreciate the info. This will come in handy
later on.
j.o.
 
Just a note to GS response. If you use the Appearance dialog box to change
the font for the message box, you should be aware that it changes it for
every application on every appearance. The message box is part of the
Windows application, not just Excel.
 
You can add a textbox with the message

    ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 158.25,
180.75, _
        64.5, 37.5).Select
    Selection.Characters.Text = "ABC"
    With Selection.Characters(Start:=1, Length:=3).Font
        .Name = "Arial"
        .FontStyle = "Regular"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With





- Show quoted text -

Thanks Joel
I'll look at this and see if I can incorporate this with what I'm
doing.
I appreciate the help.
j.o.
 
Put simply you can't. You can however design a modal userform with a lable
and CommandButton on it similar to that of a message box and use the
form.show every time you want the message box. then just add me.hide to the
click sub of the command button.
hope this helps.






- Show quoted text -

Yes, I think this will be the way to go. I've done things this way
before. I was just wondering if the msgbox font could be changed.
Would be easier than to design another UF.
Thanks to everyone for your help!
j.o.
 
Back
Top