![]() |
Range object to Array object conversion
It won't work if you wrote
Dim MyArray1() As Variant But it WILL work if you write Dim MyArray1 As Variant 'no parentheses On Thu, 31 Jul 2003 16:00:36 -0700, "Yogesh" wrote: 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 |
Range object to Array object conversion
Either one works, at least in xl2000 and later.
Alan Beban Myrna Larson wrote: It won't work if you wrote Dim MyArray1() As Variant But it WILL work if you write Dim MyArray1 As Variant 'no parentheses On Thu, 31 Jul 2003 16:00:36 -0700, "Yogesh" wrote: 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 01:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com