G
gti_jobert
Hi again all - having some problems with this! I have the folling loop
to put my values from 9 label boxes on a userform in an array;
Code:
--------------------
Static Counter As Long
Counter = Counter + 1
ReDim Preserve ary(1 To 3, 1 To Counter)
For i = 1 To 3
ary(1, i, Counter) = MachineNumber
ary(2, i, Counter) = Controls("lblDTCode" & i).Caption
ary(3, i, Counter) = Controls("lblDTDuration" & i).Caption
Next i
--------------------
which works fine - my array is filled! But how do I get all the values
out using another button on the same form? Been trying the following
with no joy;
Code:
--------------------
i = 1
j = 0
Do
For p = 1 To 4
ActiveCell.Offset(j, 6) = ary(2, p, i)
ActiveCell.Offset(j, 7) = ary(3, p, i)
Next p
i = i + 1
j = j + 1
Loop Until i = CountPopulatedGrid + 1
to put my values from 9 label boxes on a userform in an array;
Code:
--------------------
Static Counter As Long
Counter = Counter + 1
ReDim Preserve ary(1 To 3, 1 To Counter)
For i = 1 To 3
ary(1, i, Counter) = MachineNumber
ary(2, i, Counter) = Controls("lblDTCode" & i).Caption
ary(3, i, Counter) = Controls("lblDTDuration" & i).Caption
Next i
--------------------
which works fine - my array is filled! But how do I get all the values
out using another button on the same form? Been trying the following
with no joy;
Code:
--------------------
i = 1
j = 0
Do
For p = 1 To 4
ActiveCell.Offset(j, 6) = ary(2, p, i)
ActiveCell.Offset(j, 7) = ary(3, p, i)
Next p
i = i + 1
j = j + 1
Loop Until i = CountPopulatedGrid + 1