Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i am wondering why this doesn't work:
Sub test() Dim arr As Variant Dim i As Long arr = Range("h2:h11").Value For i = LBound(arr) To UBound(arr) Debug.Print arr(i) ' error here Next End Sub but this does: Sub test() Dim arr As Variant Dim i As Long arr = array("a","b","c") For i = LBound(arr) To UBound(arr) Debug.Print arr(i) Next End Sub -- how can i access each element when i create the array from a range? Gary |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
creating an array | New Users to Excel | |||
creating an array | Excel Worksheet Functions | |||
creating an array on the fly | Excel Programming | |||
Creating an Array from a Range using Offset | Excel Programming | |||
Creating an array | Excel Programming |