I have 3 variables: a, b, c
I want to throw together a simple For loop with as few lines as possible. I know I can dim an array and fill it with these values and then iterate through the array, but that seems like overkill for what I want to do. Here is what works:
Dim arrTest(1 to 3)
arrTest(1) = a
arrTest(2) = b
arrTest(3) = c
For i = lbound(arrTest) to ubound(arrTest)
'Do something
Next i
This is what I want to do (but I'm getting a type mismatch error):
dim tracking as variant
For Each tracking in [a,b,c]
'Do something
Next tracking
Any idea if what I am trying to do is even possible?
Bookmarks