Well, I'm not the one who said it: MichKa (Michael Kaplan) is, but what you
have to do is copy the code below and paste it into a module:
Function FormattedMsgBox( _
Prompt As String, _
Optional Buttons As VbMsgBoxStyle = vbOKOnly, _
Optional Title As String = vbNullString, _
Optional HelpFile As Variant, _
Optional Context As Variant) _
As VbMsgBoxResult
If IsMissing(HelpFile) Or IsMissing(Context) Then
FormattedMsgBox = Eval("MsgBox(""" & Prompt & _
""", " & Buttons & ", """ & Title & """)")
Else
FormattedMsgBox = Eval("MsgBox(""" & Prompt & _
""", " & Buttons & ", """ & Title & """, """ & _
HelpFile & """, " & Context & ")")
End If
End Function
When you save the module, make sure you do not name the module
"FormattedMsgBox": you cannot name a module the same as routines that exist
within it.
Once you've done that, change any call to MsgBox to FormattedMsgBox instead
(you can do that easily through the VB Editor using the Edit | Replace
option, also accessible through Ctrl-H)