On 07/03/2013 02:07:43, wrote:
> I am updating a Access 97 database to 2010. I was distressed to discover
> th at 2010 doesn't have the ability to natively bold the first line of a
> msgbo x as in MsgBox "First Line in Bold@@Second line in plain". The work
> around for this is to use Eval("MsgBox('First Line in Bold@@Second line in
> plain') ").
>
> Unfortunately using Eval renders the msgbox text bitmapped and rather
> ugly. I can't find any settings to fix this, has anyone any ideas to get
> the ant i aliasing back?
>
> Many Thanks
>
> Chris
>
Not original, but this appears to work, and not "Bitty"
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 trMsgBox = 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
Private Sub MsgboxTest_Click()
fMsgBox Box "This is bold.@@This is not bold.", vbQuestion + vbYesNo, "Box
Title"
End Sub
Phil