Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting text differently within a Msgbox | Excel Programming | |||
new line in msgbox text | Excel Programming | |||
MsgBox formatting | Excel Programming | |||
VBA MsgBox() Text | Excel Programming | |||
Formatting a MsgBox number | Excel Programming |