View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim May Jim May is offline
external usenet poster
 
Posts: 430
Default Compile error HELP

Trying to understand more about arrays,,
I have values in cells A11:A19, so when I run:

Sub CreateAnArray()
Dim MyArray(9) As Long
Dim i As Integer
Dim R As Range
i = 0
Set R = Range("A11:A19")
For Each c In R
MyArray(i).Value = c.Value ' Bombing Here Compile error!!
i = i + 1
Next c
End Sub


WHY?
Thanks,,