Altering buttons on MsgBox

tbirdcarl

New Member
Joined
Jul 12, 2011
Messages
13
I have a message box and I what to know the amount of doors the cabinet has.

However, I don't know how to change the button options from yes and no
I would like the options to be "One" and "Two"



Code:
Door_message = MsgBox("how many doors does the cabinet have", vbYesNo)
        If Door_message = 6 Then
        'insert the single door to the cabinet
        ElseIf Door_message = 7 Then
        'insert the double door to cabinet
        End If
 
You would need to create a userform that mimicks a vba msgBox.

Search Google - VBA Userforms for help on creating if your not familiar.
 
Upvote 0
Thanks for getting back to me so fast. I am going to mess around with the userform. I'll let you know how it goes.

Thanks again
 
Upvote 0
Ended up going with the userform
Perfect

I've only been doing VB excel coding for about 3 days now so the long code kinda freaked me out.
 
Upvote 0

Forum statistics

Threads
1,226,849
Messages
6,193,330
Members
453,790
Latest member
yassinosnoo1

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