Thread: arrays
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Hemant_india[_2_] Hemant_india[_2_] is offline
external usenet poster
 
Posts: 107
Default arrays

allen
sorry for answering this late
alen(arr,1) returns number of elements in the first dimension of array-arr
--
hemu


"Alan Beban" wrote:

Chip Pearson wrote:
I think the only way to do a For Each would be to store the arrays in a
Collection and loop through that.

Dim Coll As New Collection


Sub AAA()
Set Coll = Nothing
Dim V As Variant
Dim Arr1()
Dim Arr2()
Dim Arr3()
Coll.Add Arr1 '<--------Error message
Coll.Add Arr2
Coll.Add Arr3

For Each V In Coll
ReDim V(1 To 3)
Next V
End Sub


I get an "Object variable or With block variable not set" error message
where indicated.

Alan Beban