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
Greg Maxey - 11 Oct 2006 17:02 GMT
You could use vbTab or perhaps use a userform instead of the message
box. See:
http://gregmaxey.mvps.org/Custom_MsgBox.htm
> 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
[quoted text clipped - 20 lines]
>
> End Sub
charlie6067 - 11 Oct 2006 17:11 GMT
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
> You could use vbTab or perhaps use a userform instead of the message
> box. See:
[quoted text clipped - 25 lines]
> >
> > End Sub
Greg Maxey - 11 Oct 2006 17:27 GMT
Glad I could help and thanks for the compliment.
> Hi Greg,
>
[quoted text clipped - 35 lines]
> > >
> > > End Sub