This is more of a VBA rather than a Solidworks question. I'm trying to compare the first item in an array with the second item in the array as follows:
i = 0 For Each i In LengthsArr If LengthsArr(i) > LengthsArr(i + 1) Then llong = llong + QuanArr(i) Else Short = Short + QuanArr(i) End If Next i
It doesn't seem to work, line 4 throws up an error:
"Run-time error: 9: Subscript out of range"
Anybody know why I am getting this?