how can I add numbers in vb6?

I need to add some numbers in vb6 and don't know how to do this.  Here's what i want to do:

000157 I need to make this number go up by one over and over until the number gets to:
thanks in advance
Who is Participating?
Anthony2000Connect With a Mentor Commented:
and if you want x to be displayed in a textbox (labeled TextBox1) with leading 0's, then use the format command:

TextBox1.text = Format(x, "000000")
BeldoranConnect With a Mentor Commented:
There are a few ways to do this. The easiest may be a for loop

For variable = startvaue to endvalue
   Whatever code you want to do with it
Next variable

For x = 157 to 999999
 'do something with x
Next x
BeldoranConnect With a Mentor Commented:
your for statment could also be

For x = 157 to 999999 step 1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.