Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMH JMH is offline
external usenet poster
 
Posts: 10
Default Format font of text in a message box

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Format font of text in a message box

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.

"JMH" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
JMH JMH is offline
external usenet poster
 
Posts: 10
Default Format font of text in a message box

Ok, thanks for the info (and the quick response).

"JLGWhiz" wrote:

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.

"JMH" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Format font of text in a message box

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


"JMH" wrote in message
...
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.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Format font of text in a message box

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.

"RDFischer" wrote:

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


"JMH" wrote in message
...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Format Font Vs Normal Font basic Excel Discussion (Misc queries) 0 November 20th 08 09:04 PM
How format partially one text cell for font, etc., but not whole c Nicole Excel Discussion (Misc queries) 2 July 9th 08 09:38 PM
Change all text one font size up with various font sizes used. omchrystal New Users to Excel 2 March 6th 07 09:01 PM
How to sent for cell: font size=7,text format in VBA netx Excel Discussion (Misc queries) 1 August 8th 05 06:50 PM
Windows message text font uno@korsmaa Excel Programming 1 September 29th 04 12:55 AM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"