View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Tausif Tausif is offline
external usenet poster
 
Posts: 33
Default Dynamic Array (multiple columns) Question

You needed to check the create arrays section. Below is the exact link.

http://msdn.microsoft.com/en-us/libr...ffice.10).aspx
--
Tausif Mohammed


"pallaver" wrote:

Couldn't find anything on 2 dimensional arrays, only single dimension
arrays.... Did I miss something there?


On 7月24日, 午後3:30, Tausif wrote:
Hi,

A dynamic array can be used by delaring the line below.
Dim DynamicArray() As Long

& then re dimension it to number that you need (10,50 or whatever. )

ReDim DynamicArray(1 To 10)

Plz check this link on using arrays (static & dynamic)http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

Have a good read ;)

--
Tausif Mohammed



"pallaver" wrote:
I'm trying to create a dynamic array of data.


I had previously dimensioned at the top of my sub the following:
Public ItemArray(10,7) As Variant


This gets me what I want, but only for 10 entries. I may actually
have 50 entries.
How do you dimension an array such that the amount of entries
changes / is dynamic?


The array is currently inside of a loop for items, and I want the
array to update as below with each item.


Hopefully this is enough information to piece together what I'm
looking for.
Thanks, Neil


ItemCount = ItemCount + 1
ItemArray(ItemCount, 0) = ItemName
ItemArray(ItemCount, 1) = AAvariable
ItemArray(ItemCount, 2) = BAvariable
ItemArray(ItemCount, 3) = CAvariable
ItemArray(ItemCount, 4) = DAvariable
ItemArray(ItemCount, 5) = EAvariable
ItemArray(ItemCount, 6) = FAvariable
ItemArray(ItemCount, 7) = GAvariable- 引用テ*ストを表示しない -


- 引用テ*ストを表示 -