Make text in MsgBox Bold?

  • Thread starter Thread starter Vanessa
  • Start date Start date
V

Vanessa

Is there a way to make part of your text in a MsgBox bold?
(This would really be nice for an application that I'm
developing...) - Thanks for any help!
 
Use the function below instead of Msgbox, as follows:

fMsgBox "This is bold.@@This is not bold.",,"Box Title"




Public Function fMsgBox(Prompt As String, Optional Buttons As Integer =
vbOKOnly, _
Optional Title As Variant, Optional HelpFile As Variant, Optional Context
As Variant) As Integer
On Error Resume Next

Dim strMsgBox As String

strMsgBox = "Msgbox(" & Chr(34) & Prompt & Chr(34) & "," & Buttons

If IsMissing(Title) = False Then
strMsgBox = strMsgBox & "," & Chr(34) & Title & Chr(34)
Else
strMsgBox = strMsgBox & "," & Chr(34) & GetOption("Project Name") &
Chr(34)
End If

If IsMissing(HelpFile) = False Then
strMsgBox = strMsgBox & "," & Chr(34) & HelpFile & Chr(34)
End If

If IsMissing(Context) = False Then
strMsgBox = strMsgBox & "," & Context
End If

strMsgBox = strMsgBox & ")"

fMsgBox = Eval(strMsgBox)

End Function
 
Yes,

But how can you make it so that
for example the string ABC is bold only
in the following message box

MsgBox("Please call ABC on extension 900")
 
Yes,

But how can you make it so that
for example the string ABC is bold only
in the following message box

MsgBox("Please call ABC on extension 900")

You can't. You would have to build your own form to use instead of a
MsgBox().
 
Not true....if you use the function provided in prior post, the text will be
bold. But with messages that are not multi-paragraph, you need to fake it
out, i.e.,

fMsgBox("Please call ABC on extension 900@@ ")
 
Not true....if you use the function provided in prior post, the text will be
bold. But with messages that are not multi-paragraph, you need to fake it
out, i.e.,

fMsgBox("Please call ABC on extension 900@@ ")

It appears that you didn't read the OP's question.
 
Paul Overway said:
Yes...I did....and I provided the means to do what they asked.

I was responding to (e-mail address removed) who wanted one word
bolded in the middle of a MsgBox sentence. The OP was less specific about
what part of the MsgBox text they wanted to appear bolded. If they wanted
a bold paragraph followed by a non-bold paragraph then your suggestion fits
the bill.
 
Yes...I did....and I provided the means to do what they asked.
I was responding to (e-mail address removed) who wanted one word
bolded in the middle of a MsgBox sentence. The OP was less specific about
what part of the MsgBox text they wanted to appear bolded. If they wanted
a bold paragraph followed by a non-bold paragraph then your suggestion fits
the bill.

"(e-mail address removed)" is, apparently, the OP. Paul apparently
did not read the post to which you were *last* responding, which is the post I
was referring to, not the original post. His solutions do work for the purposes
he seems to have been targeting.
 
Back
Top