Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to build a dynamic array. Sadly, I can't seem to see my error.
I have iStartWkCol = 2 iEndWkCol = 74 iNoWks = iEndWkCol - iStartWkCol + 1 ReDim Preserve aNewDbData(1, iNoWks) As Variant 'Resize our array to accomodate the data For iCounter = iStartWkCol To iEndWkCol 'Loop through the Week Cols of the Worksheet iarrPosn = iCounter - iStartWkCol aNewDbData(0, iarrPosn) = _ Range(CLetter(iCounter) & "2").Value 'Date aNewDbData(1, iarrPosn) = _ Range(CLetter(iCounter) & "10").Value 'No Hrs Atl Dispo Next iCounter My problem is that iNoWks, thus my array size is correctly giving 73, but when it performs the loop it always run to iCounter = 42 and stops? Does anyone see what I am doing wrong here? Thank you for the extra set of eyes! QB |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Building the PageFields:=Array( | Excel Programming | |||
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 | |||
Building an array of worksheets for printing | Excel Programming | |||
Building an Array | Excel Programming | |||
Building/Creating an Array | Excel Programming |