JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 519
- Office Version
- 365
- Platform
- Windows
Hi All,
I have this scenario.
If Then
elseif then
if condition A Then
Goto Label A
end if
Label A
elseif then
if condition B Then
Goto Label B
end if
Label B
etc for Label C, D & E
End if (code is jumping to here when condition A is true)
More code
The idea being that if condition A is true, then jump to the next Else If to check Condition B and so on.
But what I am finding is the if condition A is true, instead of following the Goto Label A instruction, all remaining Else If conditions are missed because the entire If block is terminated
I don't understand why the code is not jumping to the Label to continue the checking.
Any guidance is very much appreciated please.
Thanks in advance
I have this scenario.
If Then
elseif then
if condition A Then
Goto Label A
end if
Label A
elseif then
if condition B Then
Goto Label B
end if
Label B
etc for Label C, D & E
End if (code is jumping to here when condition A is true)
More code
The idea being that if condition A is true, then jump to the next Else If to check Condition B and so on.
But what I am finding is the if condition A is true, instead of following the Goto Label A instruction, all remaining Else If conditions are missed because the entire If block is terminated
I don't understand why the code is not jumping to the Label to continue the checking.
Any guidance is very much appreciated please.
Thanks in advance