View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Make ArrayOne = ArrayTwo

I believe that you need to use a loop through each element. I don't think
you can assign one array to another array, if both are declared as actual
arrays. E.g.,

Dim A1(1 To 3)
Dim A2(1 To 3)
A1 = A2 '<<<< ERROR

will not work. If, however, you are using Variants that contain arrays, you
can set one to the other. E.g.,

Dim V1 As Variant
Dim V2 As Variant
V1 = Array(1, 2, 3)
V2 = Array(4, 5, 6)
V1 = V2 '<<< OK


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Mike H." wrote in message
...
What do I have to do to allow this statement to compile. I want to assign
all the elements in one array to the other array. Obviously the "long"
way
would be to assign element by element, but is there a faster way?

Let ItemDataTmp() = ItemData()