View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Fill Array from a Range

this works for me. just set a breakpoint on the end sub
then view/locals window

you can then expand the array clicking on the +


Sub test()
Dim lngLastRow As Long
Dim aryUserInfo As Variant

' set array equal to username range
With Worksheets("Login Data")
lngLastRow = .Cells(Rows.Count, "A").End(xlUp).Row
aryUserInfo = .Range("B2:D" & lngLastRow).Value
End With

--


Gary

"RyanH" wrote in message
...
Why can't I fill my array from the range below? I have ensured that the
range is (8 rows X 3 columns).

Dim lngLastRow As Long
Dim aryUserInfo(8, 3) As String

' set array equal to username range
With Workbooks("QG Add-In.xla").Sheets("Login Data")
lngLastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Error aryUserInfo = .Range("B2:D" & lngLastRow).Value
End With
--
Cheers,
Ryan