close
Private Sub CommandButton1_Click()
For i = 1 To 9
Cells(1, i) = i
Cells(1, i).Font.ColorIndex = 0
Next
Cells(3, 1) = Fix(Rnd() * 9 + 1)
Switch
For j = 1 To 9
i = 10 - j
Cells(3, 1) = Fix(Rnd() * i + 1)
a = Cells(1, Cells(3, 1))
Cells(1, Cells(3, 1)) = Cells(1, i)
Cells(1, i) = a
Next
End Sub
全站熱搜