View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default 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