Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a one dimensional array (one column, many rows). I try to transpose it so to get one row, many columns but don't succeed A simple example Dim myarray As Variant Dim myarrayT As Variant myarray = xlApp.ActiveSheet.Range("A1:A10") myarrayT = xlApp.Transpose(myarray) MsgBox UBound(myarrayT, 1) returns the number of rows of the original array (instead of 1) MsgBox UBound(myarrayT, 2) does'nt work (out of range) Do I miss something? Remark: I am working in VB6 Thanks a lot Avi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You original arrray has 10 rows and 1 column
your transpose array as 1 row and 10 columns the rows is the first item in Ubound and the columns the 2nd item MsgBox UBound(myarrayT, 1) returns 10 which it correct MsgBox UBound(myarrayT, 0) will return 1 "avi" wrote: Hello, I have a one dimensional array (one column, many rows). I try to transpose it so to get one row, many columns but don't succeed A simple example Dim myarray As Variant Dim myarrayT As Variant myarray = xlApp.ActiveSheet.Range("A1:A10") myarrayT = xlApp.Transpose(myarray) MsgBox UBound(myarrayT, 1) returns the number of rows of the original array (instead of 1) MsgBox UBound(myarrayT, 2) does'nt work (out of range) Do I miss something? Remark: I am working in VB6 Thanks a lot Avi |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
but MsgBox UBound(myarrayT, 0) returns "out of range" Avi |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
but MsgBox UBound(myarrayT, 0) returns "out of range" Avi |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MsgBox UBound(myarrayT, 1)
this is a vector, hence only has one dimension "avi" wrote in message ... Hello, I have a one dimensional array (one column, many rows). I try to transpose it so to get one row, many columns but don't succeed A simple example Dim myarray As Variant Dim myarrayT As Variant myarray = xlApp.ActiveSheet.Range("A1:A10") myarrayT = xlApp.Transpose(myarray) MsgBox UBound(myarrayT, 1) returns the number of rows of the original array (instead of 1) MsgBox UBound(myarrayT, 2) does'nt work (out of range) Do I miss something? Remark: I am working in VB6 Thanks a lot Avi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Transpose Question | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Further Question about Transpose | Excel Worksheet Functions | |||
simple question, hopefully a simple answer! | Excel Programming |