Bold the font in a message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good morning,

I want to bold and italic the name of active workbook in a message below.
Please help.

Msgbox "I am running this macro in workbook '" & ActiveWorkbook.Name & "."

How can I make the "ActiveWorkbook.Name" to bold and italic?

Thanks.
 
You have no control over the MsgBox, so you cannot selectively change the
font. You would need to create a userform to do that.

Cheers
Nigel
 
Hi Nigel,

Thanks for your response. So what you are saying is I have to create a form
to message the users, instead of using "Msgbox"?

Thanks.
 
That is correct, if you want to manipulate the font of your message.

You might find the following a simpler way of emphasising the message,
without changing the font by inserting a space between the message and the
file name?

Also consider change the MsgBox title?

Msgbox "I am running this macro in workbook" & vbcrlf & vbcrlf &
ActiveWorkbook.Name & "."
 
Thanks for additional information.

Nigel RS said:
That is correct, if you want to manipulate the font of your message.

You might find the following a simpler way of emphasising the message,
without changing the font by inserting a space between the message and the
file name?

Also consider change the MsgBox title?

Msgbox "I am running this macro in workbook" & vbcrlf & vbcrlf &
ActiveWorkbook.Name & "."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top