i want to generate a series of random numbers like
00101
01011
01111
01010
11101
it is a 5*5 matrix and is random every time upon execution
my code is:-
Private Sub Command1_Click()
Call Randomize
Dim x As Integer, y As Integer, z As Integer, t As Integer, s As Integer
Dim i As Integer, k As Integer
x = 0 + Int(2 * Rnd())
y = 0 + Int(2 * Rnd())
z = 0 + Int(2 * Rnd())
t = 0 + Int(2 * Rnd())
s = 0 + Int(2 * Rnd())
Print x, y, z, t, s
End Sub
but i have to click on command button each time to generate a random 0's and 1's and i want to print random 5*5 matrix in a single click as said above but in this code when i m clicking the command button i m getting a 1*5 random matrix and i have to click again and again.....can i use goto control and send the cursor to initialize again and again and print till i get a 5*5 matrix or use for loop.. but i have tried everything and it isn't working....please help me get 5*5 random matrix of 0's and 1's.......