Bonjour, j'aimerai avoir une solution pour pouvoir générer aléatoirement un nombre entre 1 et 8
mon code a présent est le suivant:
Private Sub Command17_Click()
Randomize Timer
Command1(0).Caption = Int(Rnd) * 8
Command2.Caption = Int(Rnd) * 8
Command3.Caption = Int(Rnd) * 8
Command4.Caption = Int(Rnd) * 8
Command5.Caption = Int(Rnd) * 8
Command6.Caption = Int(Rnd) * 8
Command7.Caption = Int(Rnd) * 8
Command8.Caption = Int(Rnd) * 8
Command9.Caption = Int(Rnd) * 8
Command10.Caption = Int(Rnd) * 8
Command11.Caption = Int(Rnd) * 8
Command12.Caption = Int(Rnd) * 8
Command13.Caption = Int(Rnd) * 8
Command14.Caption = Int(Rnd) * 8
Command15.Caption = Int(Rnd) * 8
Command16.Caption = Int(Rnd) * 8
End Sub
le problème ici est que le nombre qu'il me donne partout est "0"