Try this, you will need to add error trapping when not an even 3.
Dim i As Integer
Dim Data(8) As Integer
Data(0) = 1
Data(1) = 2
Data(2) = 3
Data(3) = 4
Data(4) = 5
Data(5) = 6
Data(6) = 7
Data(7) = 8
Data(8) = 9
'I need to be able to display this info as
'1 2 3
'4 5 6
'7 8 9
'I thought of maybe doing some thing like
For i = 0 To UBound(Data) Step 3
Debug.Print Data(i); Data(i + 1); Data(i + 2)
Next i
Bret Pelkey
Argosy Hearing Solutions
Software Design Engineer
xxx-xxx-xxxx
-----Original Message-----
From: Seth Bembeneck [mailto:sbembeneck@c...]
Sent: Monday, December 17, 2001 5:17 PM
To: professional vb
Subject: [pro_vb] displaying data in three columns
I have data that I need to display in three columns, with multiple rows.
the information is stored in an array
For example:
data(0) = 1
data(1) = 2
data(2) = 3
data(3) = 4
data(4) = 5
data(5) = 6
data(6) = 7
I need to be able to display this info as
1 2 3
4 5 6
7
I thought of maybe doing some thing like
for I = 0 to ubound(data)
print data(i); data(i + 1); data(i + 2)
next i
but that won't work.
Any help would be apprieciated.
Thanks,
Seth