Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Centering MsgBox text

Is there a way to center the prompt text in a MsgBox?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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]

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Centering MsgBox text

Thanks Jake, that makes perfect sense!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering text in right-side header block standard_guy Excel Discussion (Misc queries) 1 May 6th 10 12:43 AM
Cell Text Alignment - Not A Centering Issue Minitman Excel Discussion (Misc queries) 4 July 14th 08 08:42 AM
Centering the text in a message box Rob_T Excel Programming 2 October 10th 04 01:12 AM
Centering the text in a message box Rob_T Excel Programming 4 October 8th 04 10:02 AM
VBA MsgBox() Text gkelle[_9_] Excel Programming 2 April 20th 04 08:32 PM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"