MESSAGEBOX

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
Is it possible when using a messagebox that the message is in the center and not all to the left? Hope someone can help me. Thanks.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
The MsgBox does not accept the "xlCenter" property. To center you will need to pad your lines with spaces and returns, like:

Sub myMsg()
MsgBox " Nice!" & Chr(13) & " Work!"

End Sub

Hope this helps. JSW

P.S. The board may have removed the displayed spaces from the code above.
This message was edited by Joe Was on 2002-10-03 18:21
 
Upvote 0
You mean like this?

Sub myMsg() 
MsgBox "                  Nice!                   " & Chr(13) & "                    Work!                        " 

End Sub 
 
Upvote 0
Yes and no, your leading spaces yes, your trailing spaces no, adding trailing spaces just enlarges the box. JSW
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top