i'm sure its very simple, but i couldn't find how to do it
my normal use of For Loop
For x= 1 To 100
bla bla
Next
how do i "count down" like this
For X = 100 To 1
?
Printable View
i'm sure its very simple, but i couldn't find how to do it
my normal use of For Loop
For x= 1 To 100
bla bla
Next
how do i "count down" like this
For X = 100 To 1
?
For X = 100 To 1 Step -1
And if you don't know the exact code for it (step -1 would be the necessary addition) then just use basic arithmetic.
But yes it is worth using the code for, much shorter and easier.Code:For x = 1 to 100
Dim y as Integer = 100 - x
Next
great, Step -1, silly me....
and yes i knew the arithmetic 100-x , but i got Loops within Loops and it started getting confusing, it was obviuse that should be the simplest way to "reverse" it.
thank you both,
resolved