Reverse order of For Each loop

前端 未结 5 1416
一整个雨季
一整个雨季 2020-12-01 17:40

One of the most powerful things about VB is ability to loop through objects in a collection WITHOUT referring to the index - for each loop.

I find it ve

5条回答
  •  抹茶落季
    2020-12-01 18:10

    use a second variable that is set as your wanted counter and use this one in your code

    'ex: Loop from n = 19 to 16
    For i = 0 To 3
       n = 19 - i
       'your code here using n as the counter
    Next
    

提交回复
热议问题