简体   繁体   中英

In Excel VBA Is there a way to edit the MsgBox, vbYesNo buttons caption?

When the following code runs:

A = MsgBox(Prompt:="Do you wish to play on two courts?", Buttons:=vbYesNo + vbQuestion, Title:="AVAILABLE COURTS")

If A = vbYes Then
    B = MsgBox(Prompt:="Canadian Doubles match on one court and singles match on the other!", Title:="2 COURTS AVAILABLE")
    m = "TERRAINS 5-B"
    o = "TERRAINS 5-B (2)"
    p = "MATCHS"
    CASETR
End If
If A = vbNo Then
    C = MsgBox(Prompt:="O.K. 1 doubles match on available court et 1 player awaiting on the bench!", Title:="ONLY 1 COURT AVAILABLE")
    m = "TERRAINS 5-a"
    o = "TERRAINS 5-a (2)"
    p = "MATCHS Banc"
    CASETR
End If

The "Yes" and "No" buttons in the message box read "Oui" and "Non" (French). How can I edit these button captions to read "Yes" and "No" in English?

I would say it is the easies to create a custom userform. It provides superior customization options and setting it up will take less time than finding a reasonable solution to the question asked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM