MsgBox Button Labels

markkramer

Board Regular
Joined
May 8, 2002
Messages
162
Is it possible to set MsgBox labels to something specific?

For example, I can use the following to create yes and no buttons:

RunProcess = MsgBox("Do you want to run?", & vbYesNo)


Instead of asking a yes or no question, though, I'd like to ask the user the question "Do you want to run for budget or status?" and have the user to click either a button labeled "Budget" or a button labeled "Status". Is this possible with MsgBox?

Thanks!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Is it possible to set MsgBox labels to something specific?

For example, I can use the following to create yes and no buttons:

RunProcess = MsgBox("Do you want to run?", & vbYesNo)


Instead of asking a yes or no question, though, I'd like to ask the user the question "Do you want to run for budget or status?" and have the user to click either a button labeled "Budget" or a button labeled "Status". Is this possible with MsgBox?

Thanks!

The button captions probably could be changed if you know where the source code was located that creates the shape for the button. But the message box is a Windows application object, not an Excel object, and it is called from the Windows application library files when you use it. So if you make any changes to it, which you could do at one time using control panel, it changes for MS Word, MS Power Point and every other application running on the Windows OS. Basically, the answer is, No you cannot make those changes you mentioned. What you can do is create a UserForm with a text message and command buttons capability to do what you want.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,142
Members
448,551
Latest member
Sienna de Souza

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