How to center a line of text in a message box? Code included

C

charlie6067

I have code that displays the standard message box but I want to center
the third line of text over the OK button. Is that possible? Or, are
there VBA characters that can be used to push the text right to the
desired position? Many thanks for your help.

Charlie
charlie6067

Option Explicit

Sub DatePlus2()
' Message box displays information about the Date calulation field.

Dim DatePlus2 As String

MsgBox "To calculate the next field, add 2 years to the above
Effective Date field" & Chr(13) & Chr(13) & _
"and subtract 1 day. For example, if the Effective Date was
July 15, 2000, the" & Chr(13) & Chr(13) & _
"correct date for the next field would be July 14, 2002." &
Chr(13) & Chr(13) & _
"Effective Date + 2 years - 1 day."

End Sub
 
C

charlie6067

Hi Greg,

Thank you as that was exactly what I was looking for. And, that was the
best instruction page I've seen in a a long while - great graphics and
layout! I'm going to share it with my design team.

Thanks again,
Charlie
charlie6067
 
G

Greg Maxey

Glad I could help and thanks for the compliment.
Hi Greg,

Thank you as that was exactly what I was looking for. And, that was the
best instruction page I've seen in a a long while - great graphics and
layout! I'm going to share it with my design team.

Thanks again,
Charlie
charlie6067
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top