Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting MsgBox Text


Can someone get this to work: Text is supposed to be formatted *Max*imum
value required with only "Max" bolded.

Sub FormatText()
msg = "Maximum value required"
txt = msg.Characters(Start:=1,Length:=3).Font.Bold
Msgbox txt
End sub

TIA


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=379982

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting MsgBox Text


Hi David,

Though I don;t know if this is possible in a msgbox, I can tell you th
reason why your code is not working. You have set msg as "your string"
And then you are try to set the characters for the msg a
msg.character. This you can do on objects only, and need to set th
text as object.

Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=37998

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Formatting MsgBox Text

AFAIK you cannot format the text in a message box using VBA. Suggest you
create a custom userform to simulate the msgbox and add a function to
control it.

I recall that John Walkenbach refers to this approach but could not find the
reference on his site, have a look here ...
http://j-walk.com/ss/excel/index.htm

--
Cheers
Nigel



"davidm" wrote in
message ...

Can someone get this to work: Text is supposed to be formatted *Max*imum
value required with only "Max" bolded.

Sub FormatText()
msg = "Maximum value required"
txt = msg.Characters(Start:=1,Length:=3).Font.Bold
Msgbox txt
End sub

TIA


--
davidm
------------------------------------------------------------------------
davidm's Profile:

http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=379982



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
Formatting text differently within a Msgbox Linking to specific cells in pivot table Excel Programming 1 May 31st 05 10:32 AM
new line in msgbox text Patrick Excel Programming 2 November 28th 04 10:46 AM
MsgBox formatting Dave[_46_] Excel Programming 1 October 2nd 04 10:57 AM
VBA MsgBox() Text gkelle[_9_] Excel Programming 2 April 20th 04 08:32 PM
Formatting a MsgBox number Otto Moehrbach[_6_] Excel Programming 3 February 13th 04 01:25 AM


All times are GMT +1. The time now is 07:14 AM.

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

About Us

"It's about Microsoft Excel"