ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   COleSafeArray (https://www.excelbanter.com/excel-programming/288253-colesafearray.html)

chelms

COleSafeArray
 
Anyone have a guess as to why you have to dimension the COleSafeArray with DIMENSION = 2 in order to read a column from a worksheet using the Range object? Seems like column data should be a single dimension, but COleSafeArray refuses to copy the VARIANT parray unless it is created with 2 dimensions.

Tom Ogilvy

COleSafeArray
 
a column when placed in an array directly is two dimensional = (1 to # of
rows, 1 to 1)

--
Regards,
Tom Ogilvy

chelms wrote in message
...
Anyone have a guess as to why you have to dimension the COleSafeArray with

DIMENSION = 2 in order to read a column from a worksheet using the Range
object? Seems like column data should be a single dimension, but
COleSafeArray refuses to copy the VARIANT parray unless it is created with 2
dimensions.



chelms

COleSafeArray
 
Well thanks, I guess a mathemetician defined that approach.


All times are GMT +1. The time now is 07:40 AM.

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