ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range object to Array object conversion (https://www.excelbanter.com/excel-programming/273259-re-range-object-array-object-conversion.html)

Tom Ogilvy

Range object to Array object conversion
 
Dim MyArray1 as Variant
MyArray1 = Range("A1:A3").Value

Myarray1 now holds a 1 to3,1 to 1 two dimensional array. (regardless of
Option Base)

Regards,
Tom Ogilvy


Yogesh wrote in message
...
HI ,
The following code works fine :
'eg. of array being assigned to a range object
.Range("A1:A2").Value = MyArray
'just wanted to know whether the reverse is possible
' i.e. something like ---
' MyArray1 = .Range("A1:A3") 'This not working with VBA

Thanks,
Yogesh





All times are GMT +1. The time now is 04:51 PM.

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