E
Excel dweeb
Per Tom Ogilvy's earlier example in "Dumping the contents of a VBA
array to a sheet," I understand that I can write an array to a range.
Is there a way to do the reverse of this, i.e., take a range directly
into an array?
My try of:
Option Base 1
Sub abc()
Dim myarr(1 to 3, 1 to 2) as Integer
myarr = Worksheets("Sheet1").Range("A1:B3").Value
tells me I can't do that with an array.
This doesn't work either:
Option Base 1
Sub def()
Dim myvar as Variant
myvar = Worksheets("Sheet1").Range("A1:B3").Value
although the VBA Help seems to imply that it should.
What am I missing?
array to a sheet," I understand that I can write an array to a range.
Is there a way to do the reverse of this, i.e., take a range directly
into an array?
My try of:
Option Base 1
Sub abc()
Dim myarr(1 to 3, 1 to 2) as Integer
myarr = Worksheets("Sheet1").Range("A1:B3").Value
tells me I can't do that with an array.
This doesn't work either:
Option Base 1
Sub def()
Dim myvar as Variant
myvar = Worksheets("Sheet1").Range("A1:B3").Value
although the VBA Help seems to imply that it should.
What am I missing?