ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to center text in a msgbox (https://www.excelbanter.com/excel-programming/335524-how-center-text-msgbox.html)

Dave_2k5[_3_]

How to center text in a msgbox
 

I have got a message box which I want two lines of text on.

I am using chr(13) for the carrage return, but would like to centre th
text in the message box.

Can thie be done???

Cheers,

Dav

--
Dave_2k
-----------------------------------------------------------------------
Dave_2k5's Profile: http://www.excelforum.com/member.php...fo&userid=1966
View this thread: http://www.excelforum.com/showthread.php?threadid=39013


K Dales[_2_]

How to center text in a msgbox
 
A standard messagebox will not allow you to specify text alignment: you are
stuck with left justification. If you need or want better formatting options
you could create a userform instead.
--
- K Dales


"Dave_2k5" wrote:


I have got a message box which I want two lines of text on.

I am using chr(13) for the carrage return, but would like to centre the
text in the message box.

Can thie be done???

Cheers,

Dave


--
Dave_2k5
------------------------------------------------------------------------
Dave_2k5's Profile: http://www.excelforum.com/member.php...o&userid=19667
View this thread: http://www.excelforum.com/showthread...hreadid=390137



FSt1

How to center text in a msgbox
 
hi,
the message box supplied with vb is not formatable so you are sort of stuck
with it.
you can play head games with it by adding spaces to your text for a psudo
centering.
it may take a little playing with to get it right but it is a technique i
have used in the past.

regards

FSt1

"Dave_2k5" wrote:


I have got a message box which I want two lines of text on.

I am using chr(13) for the carrage return, but would like to centre the
text in the message box.

Can thie be done???

Cheers,

Dave


--
Dave_2k5
------------------------------------------------------------------------
Dave_2k5's Profile: http://www.excelforum.com/member.php...o&userid=19667
View this thread: http://www.excelforum.com/showthread...hreadid=390137




All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com