Is it possible to customize a MsgBox???

JMH022

Active Member
Joined
Mar 7, 2002
Messages
320
Does anyone know how to customize a vbYesNoCancel message box so the buttons can have different text on them? I have put a simple example below, where the "Yes" and "No" buttons on the message box would be replaced with "Hot" and "Cold".

Is this even possible?

Example:
Msgbox "What was the temperature of the water?", vbHOTCOLD, "Temperature"
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530
No, there is no way to do that with a message box. You would have to create your own userform to get that sort of functionality.
 

JMH022

Active Member
Joined
Mar 7, 2002
Messages
320
Bummer! That's not the answer I wanted, but thank you for your prompt reply!
 

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530
On 2002-11-07 15:39, NateO wrote:
Howdy Jim, I may have a different answer for you, please refer to the following thread:

http://216.92.17.166/board/viewtopic.php?topic=28092&forum=2&4

Notice there are complications regarding versions of Excel older than 2000.

Hope this helps.

Using Windows messageboxes is cheating. :)

You'd still be quicker creating your own userform as a formattable msgbox. Nice code though.
 

JMH022

Active Member
Joined
Mar 7, 2002
Messages
320
It will take me a while to study the code you referenced to see if it is what I am looking for, but thanks for your input on this!! I have created a userform for now, but may enhance my program with this at a later date. Thanks again!
 

Forum statistics

Threads
1,144,292
Messages
5,723,540
Members
422,502
Latest member
barakgahtan

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
Top