R
RyanH
Why am I getting this error "Can't Assign To Array" for this code?
Dim myArray(0 To 5) As Single
Dim Var as Single
ERROR => myArray = Array(var1, var2, var3, var4, var5, var6)
For Each Var In myArray
Var = 0
Next Var
but if I code it this way everything works:
Dim myArray As Variant
Dim Var as Variant
ERROR => myArray = Array(var1, var2, var3, var4, var5, var6)
For Each Var In myArray
Var = 0
Next Var
Any help would be great.
Dim myArray(0 To 5) As Single
Dim Var as Single
ERROR => myArray = Array(var1, var2, var3, var4, var5, var6)
For Each Var In myArray
Var = 0
Next Var
but if I code it this way everything works:
Dim myArray As Variant
Dim Var as Variant
ERROR => myArray = Array(var1, var2, var3, var4, var5, var6)
For Each Var In myArray
Var = 0
Next Var
Any help would be great.