LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 3 dimensional array


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

--------------------


Any help will be appreciated, might start looking for a new job now.
haha. cheers guys


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=507657

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mutli-dimensional Array to Single-Dimension Array Blue Aardvark Excel Programming 3 October 15th 05 09:22 AM
3 dimensional array Sandy[_6_] Excel Programming 2 September 16th 05 02:16 PM
Create One-Dimensional Array from Two-Dimensional Array Stratuser Excel Programming 1 February 23rd 05 08:46 PM
Do I need a two dimensional array for this? hotherps[_17_] Excel Programming 1 February 20th 04 04:46 PM
add to two dimensional array GUS Excel Programming 1 August 26th 03 12:12 AM


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"