Hi,
I'm building an array with info form different other arrays. Since it is not possible to write rows to an array but only columns, i'm using the following trick:
NewColumn = NewColumn + 1
ReDim Preserve MyZACostPriceTable(1 To 10, 1 To NewColumn)
MyZACostPriceTable(1, NewColumn) = MyIndirectCC
MyZACostPriceTable(2, NewColumn) = MyIndirectCC
MyZACostPriceTable(3, NewColumn) = MyIndirectCCName
MyZACostPriceTable(4, NewColumn) = MyIndirectCC
MyZACostPriceTable(5, NewColumn) = MyIndirectCCName
MyZACostPriceTable(6, NewColumn) = MyTargetZA
MyZACostPriceTable(7, NewColumn) = MyTargetZAName
MyZACostPriceTable(8, NewColumn) = MyTargetZAAmount
MyZACostPriceTable(9, NewColumn) = GetTargetZaCosts
MyZACostPriceTable(10, NewColumn) = GetTargetZaCosts / MyTargetZAAmount
This works fine, but when i want to transpose the array at the end of the code:
MyZACostPriceTable = Application.Transpose(MyZACostPriceTable)
it gives me a data type mismatch error :-(. The total amount of columns after the total array has been filled is 120.645. Can this ne too much?
Regards
Bookmarks