Inputing variables
Hi all. I have an input which will have 1 or 3 variables in it, all
seperated by a ",". It would look like this "2000" or "2000, 500, 3000" The
values are the conditions for a loop: the start, step and ending value. I
was trying to read it in using this code.
Holding = Split(I_Wt_Value, ",")
Weight(0) = Holding(0)
Weight(1) = Holding(1)
Weight(2) = Holding(2)
If IsEmpty(Weight(1)) Then
Weight(3) = 0
Weight(2) = Weight(0)
Weight(1) = Weight(0)
Else
Weight(3) = Weight(0) - Weight(1)
End If
The idea was to take the holding value and put it into an array since I
could use it a little easier but if there is one value instead of 3 in the
field, it spits out a "subscript out of range" error. I need to be able to
use it for both of those inputs I have earlier. Any ideas?
Thanks!
|