Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a 2-dimensional array [vtData(0, 0)] that is Dimensioned (Dim
vtData As Variant); its Lbound for each dimension is 0 and its UBound for dimension1 is 4 and its UBound for dimension2 is 2; therefore, 15 elements. (This array is imported into my VBA Code from Bloomberg.) I do NOT want to paste this array into a worksheet; however, in design mode only, I am using the following to do exactly that (and it works): ActiveSheet.Range(Cells(8, 1), Cells(8 + UB1, 3)) = vtData(0, 0), where UB1 is UBound for dimension1. OK, I want to create 3 child arrays (one for each column) from the parent array. (My objective is to connect the individual elements for each column into one string, using a delimiter, and then paste that string into a specified cell in my worksheet.) This is my non-working code: Dim Col_One As Variant, x As Integer ReDim Col_One(UB1 + 1) For x = 0 To UB1 Col_One(x) = vtData(x, 0) Next x When stepping-thru my code: when x = 0, there are no errors; when x = 1, I get the dreaded 'subscript out of range' error. Do I need to use WorksheetFunction.Transpose? JingleRock |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you create an Array of Arrays? | Excel Programming | |||
How do you create an Array of Arrays? | Excel Programming | |||
array of arrays stored in Name: POSSIBLE? | Excel Programming | |||
Array of Arrays in VBA | Excel Programming | |||
Extracting sub arrays from a 2-D VBA array | Excel Programming |