Is there a single VBA command that will test an expression/variable for a specific value (ie. 0) and when found, toggle an initialized variable between 0 and 1? For example,
X=0
Y=0
Loop:
If Y=0 Then X=1-X
Else
X=X
End If
Y= (a calculated expression)
Etc.
Etc.
GoTo Loop
I’m under the impression, any If statement I build into my code will slow execution down. For small applications this isn’t a problem. However with nested For loops and thousands of iterations, it can be.
X=0
Y=0
Loop:
If Y=0 Then X=1-X
Else
X=X
End If
Y= (a calculated expression)
Etc.
Etc.
GoTo Loop
I’m under the impression, any If statement I build into my code will slow execution down. For small applications this isn’t a problem. However with nested For loops and thousands of iterations, it can be.