x = 0

For x = (x+2) To (x+7)

?x

Next

?"---"

?x

?" "

x = 10

For x = (x-2) To (x-7) Step -1

?x

Next

?"---"

?x

sleep

Outputs:

2

3

4

5

6

7

8

9

---

10

8

7

6

5

4

3

2

1

---

0

When I was expecting:

2

3

4

5

6

7

---

7

8

7

6

5

4

3

---

3

I guess I shouldn't use the same variable on both sides of the equal sign but still, Is this intended? Even when I use different variables it still adds (or subtracts) one after it leaves the FOR...NEXT loop:

Dim As Integer x,n

x = 0

For n = (x+2) To (x+7)

?n

Next

?"---"

?n

?" "

x = 10

For n = (x-2) To (x-7) Step -1

?n

Next

?"---"

?n

sleep