Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Centering the text in a message box


Thanks for the replies. I might give the userform idea a try Jorge if
get the time (for now the simple message box will have to do).

Cheers,

Ro

--
Rob_
-----------------------------------------------------------------------
Rob_T's Profile: http://www.excelforum.com/member.php...nfo&userid=495
View this thread: http://www.excelforum.com/showthread.php?threadid=26647

  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Centering the text in a message box

hi, the only way i have found is to put a bunch of spaces
byfore the text,.
-----Original Message-----

Thanks for the replies. I might give the userform idea a

try Jorge if I
get the time (for now the simple message box will have to

do).

Cheers,

Rob


--
Rob_T
----------------------------------------------------------

--------------
Rob_T's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=4952
View this thread:

http://www.excelforum.com/showthread...hreadid=266474

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Centering the text in a message box

Hi, Rob
Take a look at this, brought by Paul Anthony (1998):

Function Msg(ParamArray parm())
For a = LBound(parm) To UBound(parm)
If Len(parm(a)) max_len Then
max_len = Len(parm(a))
End If
Next a
For a = LBound(parm) To UBound(parm)
If Len(parm(a)) < max_len Then
spaces = (((max_len - Len(parm(a))) / 1.6))
For b = 1 To spaces
parm(a) = " " & parm(a) & " "
Next b
End If
msgstring = msgstring & parm(a) & Chr(10)
Next a
MsgBox msgstring
End Function
------
Sub test_message()
a = Msg("This first line is a lot bigger than", "this the second", _
"But not nearly as big as this line which I'll call the thrid line", _
"line 4 is small")
End Sub

Regards.
Jorge
escreveu na mensagem
...
hi, the only way i have found is to put a bunch of spaces
byfore the text,.
-----Original Message-----

Thanks for the replies. I might give the userform idea a

try Jorge if I
get the time (for now the simple message box will have to

do).

Cheers,

Rob


--
Rob_T
----------------------------------------------------------

--------------
Rob_T's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=4952
View this thread:

http://www.excelforum.com/showthread...hreadid=266474

.



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 Centering a Title New Users to Excel 6 December 13th 06 10:02 PM
centering items yoursagain2002 Excel Worksheet Functions 1 August 11th 06 04:16 AM
Centering the text in a message box Rob_T Excel Programming 4 October 8th 04 10:02 AM


All times are GMT +1. The time now is 03:16 AM.

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

About Us

"It's about Microsoft Excel"