Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / October 2008

Tip: Looking for answers? Try searching our database.

Format font of text in a message box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JMH - 10 Oct 2008 13:44 GMT
I have a message box created, but can't seem to set the font or formatting of
different parts of the text.

eg. I want the message to read:
Don't forget {in bold}
1. wash your face {in standard font}
2. clean your teeth {in standard font}

I can get the line breaks etc, but not the changing formatting.
Any suggestions?
Thanks.
JLGWhiz - 10 Oct 2008 13:56 GMT
Sorry, that cannot be done in the standard message box.  However, you can
create a form with a label on it and format the text of the label very
easily.  Then use the UserForm.Show method to display the label as a pop up
message.

> I have a message box created, but can't seem to set the font or formatting of
> different parts of the text.
[quoted text clipped - 7 lines]
> Any suggestions?
> Thanks.
JMH - 10 Oct 2008 14:11 GMT
Ok, thanks for the info (and the quick response).

> Sorry, that cannot be done in the standard message box.  However, you can
> create a form with a label on it and format the text of the label very
[quoted text clipped - 12 lines]
> > Any suggestions?
> > Thanks.
RDFischer - 11 Oct 2008 02:55 GMT
JMH,

   There is a VBA function that permits addressing individual characters...

With Worksheets("Sheet1").Range("A1")
   .Value = "abcdefg"
   .Characters(3, 1).Font.Bold = True
End With

You could construct a string and copy it to a cell, then address individual
characters as shown using the Characters function which enables one to set
size, font, color, bold, underline, etc.

   RDF

>I have a message box created, but can't seem to set the font or formatting
>of
[quoted text clipped - 8 lines]
> Any suggestions?
> Thanks.
JLGWhiz - 11 Oct 2008 04:06 GMT
Won't work in a standard message box.  It has built in font that cannot be
changed without accessing the source code for the MsgBox function, and that
is beyound the scope of VBA.

> JMH,
>
[quoted text clipped - 23 lines]
> > Any suggestions?
> > Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.