I've got the following code extract, I'm trying to copy a range of values onto the declared array and it keeps on giving me the 'can't assign to array' error',
Dim permittedCurve(0 To 7000) As Variant
permittedCurve = activeWorkbook.Worksheets("Origin").Range("AB6:AB7006").value
I've tried this too,but giving me the same error..
Dim permittedCurve(7000) As Variant
permittedCurve = application.transpose(activeWorkbook.Worksheets("Origin").Range("AB6:AB7006").value)
Could someone please help? I don't really see anything wrong with both approaches. :-(
=============================
Updated
I've tried the following,
Dim permittedCurve(4) As Variant
Dim indicationCurve(4) As Variant
indicationCurve(0) = 1
indicationCurve(1) = 10
indicationCurve(2) = 100
indicationCurve(3) = 1000
indicationCurve(4) = 10000
'Copying the curves
permittedCurve = indicationCurve
This would still prodcue the same "Can't assign to array" Error... WHY?