Link to home
Start Free TrialLog in
Avatar of satmisha
satmishaFlag for India

asked on

Change UI of defualt message box in Excel 2010

Hi Experts,
Is there any way to change the defualt UI of message box ? IF no can you please provide alternative to this.

Looking forward to hearing from you.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Would you like to use a userform that looks like a msgbox? I do that sometimes in my Vb6 programs and if you want to take that approach I'll see if I can adapt it to VBA.
Avatar of satmisha


I would be happy to use it, would it be possible for you to provide some code for thta ?
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you give some examples of what you'd like to change or additional features you'd like to see?  There are a few options to the buttons available and display icons.

For example, if there were a critical error that would require halting a subroutine you could use:
Msgbox "A serious error has occurred; the macro will halt.", vbCritical+vbOKOnly,"Error"

Open in new window

User generated image

Thankx Glenn... I would like to change the Title bacjgound colour of default message box..
The answer is "No, you can't change the color of the title, background, fonts or button(s) in a message box created with the Msgbox method."  Nor can you change the title color in a user form; it's not an editable attribute.

You can - in Windows - change any of these attributes in a message box, but it will affect ALL message boxes in Windows, not just Excel.  I've seen coding that will change system colors on the fly when a message box is called, but I don't believe that's ideal since it affects all Windows apps at the same time and if there were a halt or crash in Excel, the settings might not reset.

There is a third-party add-in from Japan that appears to let you create custom forms, but I've not tried it.

Thankx Martin...
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014