PC Review


Reply
Thread Tools Rate Thread

Bold characters in a msgBox

 
 
=?Utf-8?B?cmlja21vcg==?=
Guest
Posts: n/a
 
      7th Sep 2004
Is there any way to display bold characters in a msgBox ?

And if not, WHY Microsoft ?
--
Fred
http://www.datasolveuk.co.uk
 
Reply With Quote
 
 
 
 
tina
Guest
Posts: n/a
 
      8th Sep 2004
AFAIK, you can't do it directly from VBA with the Msgbox() function. but you
can use the MsgBox action in a macro, see the Msgbox Action topic in Access
Help (*not* VBA Help) and read the Remarks section of the topic.
if necessary, you can call the macro from VBA with
DoCmd.RunMacro "MacroName"

hth


"rickmor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there any way to display bold characters in a msgBox ?
>
> And if not, WHY Microsoft ?
> --
> Fred
> http://www.datasolveuk.co.uk



 
Reply With Quote
 
 
 
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      8th Sep 2004
Graham Seach, ACCESS MVP, posted a VBA function that will mimic the bolding
characteristic of older version's message box:

Public Function FMsgBox(sLine1 As String, sLine2 As String, _
sLine3 As String, Optional lButtons As VbMsgBoxStyle = vbOKOnly, _
Optional sTitle As String = vbNullString, Optional HelpFile As Variant,
_
Optional Context As Variant) As VbMsgBoxResult
'
'Description: This function creates a formatted MsgBox
' similar to that which was available in Access 97 and
' earlier versions.
'
'Inputs: sLine1: The first line of text to be displayed.
' sLine2: The second line of text to be displayed.
' sLine3: The third line of text to be displayed.
' lButtons: The buttons to be displayed (exposed
' as a vbMsgBoxStyle enum).
' Title: The (optional) MsgBox title.
' HelpFile: The (optional) help filename.
' If HelpFile is supplied, then Context
' must also be supplied.
' Context: The (optional) context or topic ID.
'
'Outputs: The standard MsgBox return value.

Dim sPrompt As String

'All three lines must exist
If Len(sLine1) > 1 And Len(sLine2) > 0 And Len(sLine3) > 0 Then
sPrompt = sLine1 & "@" & sLine2 & "@" & sLine3

If IsMissing(HelpFile) Or IsMissing(Context) Then
FMsgBox = Eval("MsgBox(""" & sPrompt & """, " _
& lButtons & ", """ & sTitle & """)")
Else
FMsgBox = Eval("MsgBox(""" & sPrompt & """, " _
& lButtons & ", """ & sTitle & """, """ _
& HelpFile & """, " & Context & ")")
End If
Else
DoCmd.Beep
MsgBox "You must supply all three lines.", _
vbOKOnly + vbExclamation, "Argument missing"
End If
End Function

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

--

Ken Snell
<MS ACCESS MVP>

"tina" <(E-Mail Removed)> wrote in message
news:ttt%c.565225$(E-Mail Removed)...
> AFAIK, you can't do it directly from VBA with the Msgbox() function. but

you
> can use the MsgBox action in a macro, see the Msgbox Action topic in

Access
> Help (*not* VBA Help) and read the Remarks section of the topic.
> if necessary, you can call the macro from VBA with
> DoCmd.RunMacro "MacroName"
>
> hth
>
>
> "rickmor" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is there any way to display bold characters in a msgBox ?
> >
> > And if not, WHY Microsoft ?
> > --
> > Fred
> > http://www.datasolveuk.co.uk

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get regular Bold? I only have Bold Italic. =?Utf-8?B?ZGVhZGx5ZHJ6?= Microsoft Word Document Management 2 29th Apr 2005 04:16 PM
why does the whole page go to bold when I select Bold for the tit. =?Utf-8?B?QXJ0aHVyIE1jUGhlZQ==?= Microsoft Word Document Management 7 13th Dec 2004 11:52 PM
Re: bold text, non bold underline possible? Grace L. Judson Microsoft Word Document Management 0 25th Jun 2004 06:30 PM
Reversed Bold and Not bold gordo Microsoft Word New Users 5 12th Mar 2004 06:01 PM
Remove bold from text, but it goes back to bold. =?Utf-8?B?Q2hhcmxlcw==?= Microsoft Word Document Management 1 16th Jan 2004 02:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:59 AM.