Avatar of satmisha
satmisha
Flag 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.
Microsoft Excel

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Martin Liss

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.
satmisha

ASKER
I would be happy to use it, would it be possible for you to provide some code for thta ?
ASKER CERTIFIED SOLUTION
Martin Liss

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Glenn Ray

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

sample error

-Glenn
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
satmisha

ASKER
Thankx Glenn... I would like to change the Title bacjgound colour of default message box..
Glenn Ray

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.

Regards,
Glenn
satmisha

ASKER
Thankx Martin...
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Martin Liss

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