![]() |
Assigning range to array not working
Can someone explain why this isn't working?
Sub Test() Dim aArray as Variant Set rng = Range("A1").CurrentRegion.Select aArray = rng.Value End Sub When I break the code I see the following when I highlight aArray (on the Set rng, I put arrow of rng and I see: rng = nothing) (on the rng.Value, I see <Object variable or With block variable not set I have values in a 51000 x 10 range beginning at "A1" |
Assigning range to array not working
Marston wrote:
Can someone explain why this isn't working? Sub Test() Dim aArray as Variant Set rng = Range("A1").CurrentRegion.Select aArray = rng.Value End Sub When I break the code I see the following when I highlight aArray (on the Set rng, I put arrow of rng and I see: rng = nothing) (on the rng.Value, I see <Object variable or With block variable not set I have values in a 51000 x 10 range beginning at "A1" Drop the .Select Alan Beban |
Assigning range to array not working
Thanks Alan -
and please disregard the next message too.....I think I'm back to where I was yesterday - at least I'm able to write out my arrays now. Alan Beban wrote in message ... Marston wrote: Can someone explain why this isn't working? Sub Test() Dim aArray as Variant Set rng = Range("A1").CurrentRegion.Select aArray = rng.Value End Sub When I break the code I see the following when I highlight aArray (on the Set rng, I put arrow of rng and I see: rng = nothing) (on the rng.Value, I see <Object variable or With block variable not set I have values in a 51000 x 10 range beginning at "A1" Drop the .Select Alan Beban |
All times are GMT +1. The time now is 05:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com