ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transpose simple question (https://www.excelbanter.com/excel-programming/429744-transpose-simple-question.html)

avi

Transpose simple question
 
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




All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com