View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Writing Range to Array

Frank Kabel wrote:

Hi
try
Sub Test()
Dim aArray()
Dim rng As Range

Set rng = Range("A1").CurrentRegion
aArray.Value = rng.Value
End Sub

That doesn't work either, at least not in xl2000. So either it wasn't
tested before posting or Frank Kabel is using a later version in which
it works. Use

aArray = rng.Value

or

Dim aArray As Variant
aArray = rng or aArray = rng.Value

Alan Beban