Formatting text in a message box

General Ledger

Active Member
Joined
Dec 31, 2007
Messages
460
Sorry if I am neglegent, but I am a new member to the board and not well versed in VBA.

I want to control the formatting of text that will appear in a message box using Excel 2003 VBA. I want to control the alignment, font, size, etc. For example, I want an OK only message box that reads;

--------------------------------------
Credit...

This spreadsheet was created by:

Your Friendly Neigborhood Spiderman
--------------------------------------

(If you are going to create something worthwhile, you might as well take credit for it.)

Where "Credit..." is the message box title. The following two lines should be centered. The second line in bold and use a larger font size.


Please be detailed in your response as I am fairly new to this.

Thanks.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Welcome to the Board!

You can start with Colo's ktMsgBox Add-In

Or create a custom user form that mimics a Message Box.

Otherwise you're really limited with what you can do with a Message Box.

Hope that helps,

Smitty
 
Upvote 0
Thanks for the speedy response.

Since the file is on a network and used by dozens of people with various levels of skills in Excel, I was hoping for a simple solution. I guess that means sticking with plain vanilla.

I believe with using an add-in, it would have to be loaded on every users' machine. In my specific case, 25 desktops in the office plus some traveling laptops. Sounds like a headache for a little fancy advertising. Am I correct?

I will check out the user form option though.

Happy New Year!
 
Upvote 0
About the nearest you can get with a standard MsgBox:

Code:
MsgBox prompt:="--------------------------------------" & vbCrLf & "Credit..." & vbCrLf & "This spreadsheet was created by:" & vbCrLf & "Your Friendly Neigborhood Spiderman" & vbCrLf & _
"--------------------------------------", Buttons:=vbOKOnly
 
Upvote 0
VoG II,

The same road I am heading down for now.


Pennysaver,

Splash Screen looks like a fun, new topic but not on New Years Eve. Thanks for the follow up. I will check it out later.


Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,618
Members
449,092
Latest member
amyap

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