0

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?

GSerg
  • 76,472
  • 17
  • 159
  • 346
  • 3
    Without changing your regional/language settings? – braX Oct 20 '20 at 18:25
  • 3
    Does this answer your question? [How do I change the names of buttons on a message box?](https://stackoverflow.com/questions/33607987/how-do-i-change-the-names-of-buttons-on-a-message-box) – braX Oct 20 '20 at 18:25
  • 1
    Seems necessary to adapt this link to VBA7 to be helpful in more current versions:-( – T.M. Oct 20 '20 at 19:02
  • 1
    My project [VBA.ModernBox](https://github.com/GustavBrock/VBA.ModernBox) does it the _other way 'round_ (uses the native captions), but it could give some ideas should you decide to design a custom messagebox. – Gustav Oct 21 '20 at 08:30

1 Answers1

0

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Thomas J.
  • 59
  • 8
  • 2
    So true, but this a comment rather than an answer. – Gustav Oct 21 '20 at 08:25
  • Recommend reading [UserForm1.Show?] (https://rubberduckvba.wordpress.com/2017/10/25/userform1-show/) which btw gives an outstanding overview of Userform techniques. C.f. [Destroy a modeless userfrom instance properly](https://stackoverflow.com/questions/47357708/vba-destroy-a-modeless-userform-instance-properly) as for modeless forms. – T.M. Oct 21 '20 at 08:54