----------------------------------------------------------------------------------------------
_Private Sub CommandButton1_Click()
For i = 1 To 9
Cells(1, i) = i
Cells(1, 1).Font.ColorIndex = 0
Next
myrnd = (Fix(Rnd() * 9) + 1)
Cells(3, 3) = myrnd
Cells(1, myrnd).Font.ColorIndex = 5
tmp = Cells(1, myrnd)
Cells(1, myrnd) = Cells(1, 9)
Cells(1, 9) = tmp
myrnd = (Fix(Rnd() * 8) + 1)
tmp = Cells(1, myrnd)
Cells(1, myrnd) = Cells(1, 8)
Cells(1, 8) = tmp
End Sub
沒有留言:
張貼留言