Rename Buttons For YesNoCancel VBA

clark544

Board Regular
Joined
Jan 2, 2009
Messages
183
Here is my code:

Code:
Private Sub Workbook_Open()
    Select Case MsgBox("my question?", vbYesNoCancel)
    Case Is = vbYes
       'Yes Code will sort Moistures and Owners
    Case Is = vbNo
        'NO code will sort Moistures and Fields
    Case Is = vbCancel
        ' Will Sort neither and allow for data entry
    Case Else
        Debug.Print "Whoops"
    End Select
End Sub

I want to rename the Yes, no, and cancel buttons to Pay Owner, Field Close Out, and Data entry. How can I go about doing that? Is there a simple way to to rename them ?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I went with the userform, but what does the .me on the end mean? I think that's giving me an argument not optional error.

Fixed!
You need to remove the . (dot) from .me
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,072
Messages
6,128,631
Members
449,460
Latest member
jgharbawi

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