Making Message Boxes Look Pretty

andy_dyer

Registered User.
Local time
Today, 15:12
Joined
Jul 2, 2003
Messages
806
I am newbie when it comes to VBA, but I have a few questions on the formatting of message boxes.

1. Is there any code that I can use to give my message boxes a header instead of the Access standard one?

2. How can I split my message over two lines instead of having one long line going across the screen?

3. How can I bold or italic any of the text in the message boxes?

4. How can I change the font on the text in the message box?

Any suggestions would be useful.

Thanks

Andy
 
The easiest way is to create popup forms that resemble message boxes. You can make these look how you like, and using...
Code:
Me.Caption = "Your header goes here"
will make the caption on the form display what you like.

IMO
 
1. msgbox "YourMessage",YourOptions,"YourTitle"

2. msgbox "Line 1" & vbcrlf & "Line2",options,"Title"

3. Not easily - prev could use @ sign in A97 but not in 2k

4. No Idea:p

I would go with IMO's suggestion though if you really want pretty formatting.

Msgboxes just do a job - fashion modelling isn't one of them ;)
 
Fizzio ... you can still format a message box as you could in Access 97 in Access 2000 and 2002 ...

You just can't do it the same way as in Access 97 ......

Here are two examples show how it can be done.
Code:
Eval ("MsgBox ('Your Bold Text Here.@Your Normal Text Here.@@',0,'Your Title Here')")

' Or

If Eval("MsgBox('Your Bold Text Here.@Your Normal Text Here.@@',0, 'Your Title Here')") = vbOK Then
  ' Do something here
End If
HTH
RDH
 
Cheers Ricky. I always believed that it could not be done and so didn't try! Never always listen to the rumours.
 

Users who are viewing this thread

Back
Top Bottom