NewData question

Paul Cooke

Registered User.
Local time
Today, 23:32
Joined
Oct 12, 2001
Messages
288
hi guys

could someone tell me if it possible to BOLD "NewData" in VB?

the following is part of a msgbox

Code:
& vbCrLf & vbCrLf & Chr(34) & NewData & Chr(34) & vbCrLf & vbCrLf & _

what I want is for the newdata to be be BOLD in the msgbox when it appears - is this poossible? if so how !!

many thanks
 
Try this user Defined one

Code:
Public Function FMsgBox(Prompt As String, _
              Optional Buttons As VbMsgBoxStyle = vbOKOnly, _
              Optional Title As Variant = "", _
              Optional HelpFile As Variant, _
              Optional Context As Variant) As Variant
              
    On Error Resume Next
    If Nz(Title, "") = "" Then
        Title = CurrentDb().Properties("AppTitle")
    End If
    On Error GoTo Err_MsgBox

    If IsMissing(HelpFile) Or IsMissing(Context) Then
        FMsgBox = Eval("MsgBox(""" & Prompt & """, " & Buttons & ", """ & Title & """)")
    Else
        FMsgBox = Eval("FMsgBox(""" & Prompt & """, " & _
                    Buttons & ", """ & Title & """, """ & _
                    HelpFile & """, " & Context & ")")
    End If
Exit_MsgBox:
    Exit Function
Err_MsgBox:
    MsgBox = VBA.MsgBox(Prompt, Buttons, Title)
    GoTo Exit_MsgBox
End Function


To use
Call FMsgBox("Hello world@Hello world@")
 
Many thanks David for the reply

On the basis I'm very new to this could you tell me where I would actually put this code and how would I ensure 'my text' was in it?


Thanks again

Paul
 

Users who are viewing this thread

Back
Top Bottom