Code:how do i see with domino it is and witch number is asigned to it? thanks Private Sub Shuffle() Dim X As Integer Dim IsUsed(28) As Byte, pipVal(28) As Integer Dim ThisCard As Integer Randomize 'generate a number between 1 and 28 inclusive for each of 28 dominoes For X = 1 To 28 Try2: ThisCard = Int((28 - 1 + 1) * Rnd + 1) If IsUsed(ThisCard) = 1 Then GoTo Try2 Else 'get and store pipVal(X) = ThisCard IsUsed(ThisCard) = 1 Debug.Print pipVal(X) End If Next End Sub Private Sub Command1_Click() Shuffle End Sub




Reply With Quote