Message Box

Idris

Registered User.
Local time
Today, 13:00
Joined
Nov 9, 2005
Messages
67
dim vouchno as long
vouchno=123456
msgbox ("Entry saved with voucher no " & vouchno")


Request assistance over here to change the fonts appearing in the message box with vouchno ie 123456 to be displayed in Bold

Thanks
 
I've used this function to provide emphasis in the 'Header' line of a msgbox, however, you will find that it is NOT possible to format text in a standard msgbox as you requested

Code:
Function CustomMsgBox(BoldPrompt As Variant, Prompt As Variant, _
                    Optional Buttons As VbMsgBoxStyle = vbOKOnly, _
                    Optional Title As Variant = "Message") As VbMsgBoxResult

    CustomMsgBox = Eval("MsgBox ('" & Replace(BoldPrompt, "'", "") & "@" & _
                                Replace(Prompt, "'", "") & "@@'," & Buttons & ",'" & _
                                Replace(Title, "'", "") & "')")
End Function

The only other option would be to create your own messagebox using a standard form.

Hope this helps,

Scott
 
Not with a regular message box

I hope Scott's suggested code works. But it's worth mentioning (possibly obvious) that a standard message box doesn't let you choose fonts. You only have a basic set of display options.
 
Yes the code works GREAT -- Thanks

but as said its worth discussing this issue
 

Users who are viewing this thread

Back
Top Bottom