View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Centering MsgBox text

Hi Patrick,

Patrick wrote:
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]