Private Sub Command2_Click() msgbox"BRAVO tu as gagner le jeu" unload form1 End Sub
Private Sub Command8_Click() msgbox"Dommage tu as perdu retente ta chance" command8.visible = true End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim Gagnant As Integer Private Sub Command1_Click(Index As Integer) 'Verification If Index = Gagnant Then MsgBox "BRAVO tu as gagner le jeu" If MsgBox("Rejouer ?", vbYesNo) = vbYes Then For i = 1 To Command1.UBound Command1(i).Visible = True Next i Call ChoixAléatoireGagnant Else End End If Else MsgBox "Dommage tu as perdu retente ta chance" Command1(Index).Visible = False End If End Sub 'Cette exemple utilise 5 bouton de commande 'Index de 1 à 5 Private Sub Form_Load() Call ChoixAléatoireGagnant End Sub Sub ChoixAléatoireGagnant() Randomize Gagnant = Int(Rnd * 4) + 1 End Sub