Thread: Arrays
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Arrays

hi Group,

I am have a hard time with the syntax for setting up an Array.
This is what I have so far:
Dim CloseChanges(), ThisDate As Date, ThisClose As Double
ReDim CloseChanges(YearsTotal)
For y = 1 To YearsTotal
ThisDate = ActiveCell.Value
ThisClose = ActiveCell.Offset(0, 6).Value
ActiveCell.Offset(-52, 0).Select

Next y
It did not like that I was using a variable to start with, so I went to the
ReDim syntax, but it still does not like it. The Array has only 2 data points
it is trying to pull in.

After it runs, I went to the Immediate Window and tried this:
?ThisClose(1)
But I get a message "Expect Array". Not sure wherre I am going wrong?

Thanks,
David