Dim a(1 To 16)
Private Sub Command1_Click()
For i = 1 To 16
Randomize
a(i) = Int(Rnd * 90 + 10)
If i Mod 4 = 0 Then
Text1 = Text1 & a(i) & vbCrLf
Else
Text1 = Text1 & a(i) & Space(1)
End If
Next
End Sub
Private Sub Command2_Click()
temp = a(2)
a(2) = a(5)
a(5) = temp
temp = a(3)
a(3) = a(9)
a(9) = temp
temp = a(4)
a(4) = a(13)
a(13) = temp
temp = a(8)
a(8) = a(14)
a(14) = temp
temp = a(12)
a(12) = a(15)
a(15) = temp
For i = 1 To 16
If i Mod 4 = 0 Then
Text2 = Text2 & a(i) & vbCrLf
Else
Text2 = Text2 & a(i) & Space(1)
End If
Next
End Su