View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Loading an Array



Everywhere I look, it appears I have to manually load an array ex: a =
array(100, 101, 102 ...)

Is there a way to do it with code? I need 50 items in the array but the
data is always changing.
What I need is:

MyArray(1) = Activecell.offset(1,0)
MyArray(2) = Activecell.offset(2,0)

etc.

When I try, I get a type mismatch error.

Thanks
Chad


Hi Chad
MyArray(1)=activecell.offset(1,0).value

or

for c = 1 to 10
MyArray(c)=activecell.offset(c,0).value
next

Regards

Per