Programmation Msgbox si Caption = X
napster94700
Messages postés
76
Date d'inscription
Statut
Membre
Dernière intervention
-
jjsteing Messages postés 1670 Date d'inscription Statut Contributeur Dernière intervention -
jjsteing Messages postés 1670 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour, j'aurais voulu avoir votre aide pour cette commande.
Je n'arrive pas a faire en sorte que qu'une fenêtre s'ouvre si les 3 premiers boutons sont cochés.
J'ai 3 buttons et 2 CheckBox
Si je coche la première CheckBox cela va me mettre un X sur le ou les boutons que je clic
Et je veux qu'une fois avoir cliquer sur les 3 boutons donc rempli de X j'ai une fenetre qu'il souvre
If bt1.Caption = "X" And bt2.Caption = "X" And bt3.Caption = "X" Then MsgBox "X Gagne"
La sa ne met rien mais la fenetre ne s'ouvre pas
La sa met une erreur
If bt1.valeur = Check1.Text And bt2.valeur = Check1.Text Then MsgBox "ok"
Concretement je veux dire:
If les 3 boutons ont pour caption "X" alors mettre fenetre.
Merci
Je n'arrive pas a faire en sorte que qu'une fenêtre s'ouvre si les 3 premiers boutons sont cochés.
J'ai 3 buttons et 2 CheckBox
Si je coche la première CheckBox cela va me mettre un X sur le ou les boutons que je clic
Et je veux qu'une fois avoir cliquer sur les 3 boutons donc rempli de X j'ai une fenetre qu'il souvre
If bt1.Caption = "X" And bt2.Caption = "X" And bt3.Caption = "X" Then MsgBox "X Gagne"
La sa ne met rien mais la fenetre ne s'ouvre pas
La sa met une erreur
If bt1.valeur = Check1.Text And bt2.valeur = Check1.Text Then MsgBox "ok"
Concretement je veux dire:
If les 3 boutons ont pour caption "X" alors mettre fenetre.
Merci
A voir également:
- Programmation Msgbox si Caption = X
- Site x - Guide
- Sites X : Pornhub, YouPorn et Redtube sont de nouveau accessibles en France - Guide
- Photoscape x - Télécharger - Retouche d'image
- Direct x - Télécharger - Pilotes & Matériel
- Sit x - Accueil - Protection
49 réponses
si si... c'est ca :) bon, y aplus court bien sur, mais c'est l idée :)
allez.. comme t as trouver, j te donne la solution :)
PasFini =false
For Each bt In Command1 'pour tous les controls de command1
If bt.Caption = "" Then PasFini = True 'met la veriable pasfini à vrai si il trouve un command vide
Next
If Not PasFini Then 'si ce n'est pas pas fini=> fini
If MsgBox("Match nul." & Chr$(10) & Chr$(13) & "Nouvelle partie ?", vbYesNo) = vbYes Then NouveauJeu_Click
End If
allez.. comme t as trouver, j te donne la solution :)
PasFini =false
For Each bt In Command1 'pour tous les controls de command1
If bt.Caption = "" Then PasFini = True 'met la veriable pasfini à vrai si il trouve un command vide
Next
If Not PasFini Then 'si ce n'est pas pas fini=> fini
If MsgBox("Match nul." & Chr$(10) & Chr$(13) & "Nouvelle partie ?", vbYesNo) = vbYes Then NouveauJeu_Click
End If
If Command1(1).Caption <> "" And Command1(5).Caption <> "" And Command1(9).Caption <> "" Then Exit Sub
If Command1(3).Caption <> "" And Command1(5).Caption <> "" And Command1(7).Caption <> "" Then Exit Sub
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"
J'ai trouvé tout seul !!!
J'ai pa encore lu ta solution ;)
If Command1(3).Caption <> "" And Command1(5).Caption <> "" And Command1(7).Caption <> "" Then Exit Sub
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"
J'ai trouvé tout seul !!!
J'ai pa encore lu ta solution ;)
Parceque en fait si on faisait
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"
et que toutes les cases était coché mais que soit o soit x gagnait en diagonale sa mettai
fenetre x ou o gagne
et apres fenetre match nul
mais la c bon :p
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"
et que toutes les cases était coché mais que soit o soit x gagnait en diagonale sa mettai
fenetre x ou o gagne
et apres fenetre match nul
mais la c bon :p
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Comment sa ?
lol je te laisse faire voir ce que tu essai de me dire la si un joeur gagne c'est bon sa met la box x ou o gagne lol
lol je te laisse faire voir ce que tu essai de me dire la si un joeur gagne c'est bon sa met la box x ou o gagne lol
ben si un joueur gagne .. y a plus rien a faire (mis a part recommencer une partie) donc.. le code qu'il y a apres on le squizz.. d'où le exit sub si gagné tu me suis??