Centering MsgBox text

  • Thread starter Thread starter Guest
  • Start date Start date
Hi Patrick,
Is there a way to center the prompt text in a MsgBox?

No, not really. You could use the Space$ function to pad the beginning of
the string with spaces, but that would require some trial and error to find
the correct length. Plus, if a user has a different standard font than you,
it may not appear as expected on his/her machine.

The best way would be to create your own UserForm that looks/acts like a
MsgBox. You could drop a label control on it and center the text that way.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

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

Similar Threads


Back
Top