In the code below
For i = LBound(arr) To UBound(arr)
What is the point in asking using LBound? Surely that is always 0.
LBound
Why not use For Each? That way you don't need to care what the LBound and UBound are.
For Each
UBound
Dim x, y, z x = Array(1, 2, 3) For Each y In x z = DoSomethingWith(y) Next
2.1m questions
2.1m answers
60 comments
57.0k users