Floyd #1 The step value must be a constant. Use a While loop instead. I = 0 While I <= MaxNum ' do something I :+ XInterval Wend You would need to test I >= MinNum if the step value is negative.