Bold words in a MsgBox

P

Paolo

Nope the @ sign is obsolete...

Brendan Reynolds said:
There is a way to bold the first line in a MsgBox. I don't know of a way
to bold a word within a line, or a line other than the first one. If the
first line will do, check out Michael Kaplan's article 'The formatted
MsgBox in Access 2000' at ...
http://www.trigeminal.com/usenet/usenet015.asp?1033

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
B

Brendan Reynolds

I'm not sure what your point is. The article at the URL I posted
demonstrates how to make the '@' work in Access 2000 and later. But if that
doesn't meet your needs, then as far as I know the only alternative is to
use a custom form instead of the built-in MsgBox.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
P

Paolo

Hey I tried to use the function that Brendan sent me, I copied it and
created a new module. I am sorry I am just starting now to use VBA in Access
and still struggling with fully understanding how it works. In my message
box I already have written a vbNewLine... could that affect the use of th @,
as despite the creation of the module containing Brendan's function the @
symbol still prints on the message box...

Am I making any sense???
 
B

Brendan Reynolds

It's not my function, it's Michael Kaplan's, but I just tested it, and it
works without or without a vbNewLine in the prompt ...

Function FormattedMsgBox( _
Prompt As String, _
Optional Buttons As VbMsgBoxStyle = vbOKOnly, _
Optional Title As String = vbNullString, _
Optional HelpFile As Variant, _
Optional Context As Variant) _
As VbMsgBoxResult
If IsMissing(HelpFile) Or IsMissing(Context) Then
FormattedMsgBox = Eval("MsgBox(""" & Prompt & _
""", " & Buttons & ", """ & Title & """)")
Else
FormattedMsgBox = Eval("MsgBox(""" & Prompt & _
""", " & Buttons & ", """ & Title & """, """ & _
HelpFile & """, " & Context & ")")
End If
End Function


Public Sub TestFormattedMsgBox()

Dim strPrompt As String

strPrompt = "Wrong button!@This button doesn't work.@Try another."
FormattedMsgBox strPrompt
strPrompt = "Wrong " & vbNewLine & "button!@This button doesn't work@Try
another."
FormattedMsgBox strPrompt

End Sub

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Top