Private Sub Command1_Click()
Dim a(5, 7)
For i = 1 To 5
For j = 1 To 6
a(i, j) = Int(Rnd * 9) + 1
a(i, 7) = a(i, 7) + a(i, j)
Print a(i, j);
Next j
Print
Next i
Print: Print
For i = 1 To 5
For j = 1 To 6
a(i, 7) = a(i, 7) + a(i, j)
Print a(i, j);
Next j
Print a(i, 7)
Next i
End Sub