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 & "."
"AccessHelp" wrote:
> 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.
>
> "Nigel RS" wrote:
>
> > 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
> >
> > "AccessHelp" wrote:
> >
> > > 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.
|