Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 97 does not allow array assignment. In later versions, it is allowed.
-- Jim Cone Portland, Oregon USA "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) | Excel Programming | |||
Create an Array to fill a Range | Excel Programming | |||
how do i fill an array? tia | Excel Programming | |||
fill array | Excel Programming | |||
fill down array to last available row | Excel Worksheet Functions |