07-20-2016, 10:30 PM
I'm trying to figure out a way to skip around my scripts based on a variable value.
Say I want to skip to line 149 if something happens in line 4
Is there anything like this available in VB?
ex.
line 1 Call Step1
line 2 Call Step2
line 3 Call Step3
line 4 Call Step4
line 5 Call Step5
Public Func_Step1()
If then
Else
Go to line 3 'this would skip step 2 if something happened.
End If
End Function
Public Func_Step2()
If then
Else
Go to line 5 'this would skip step 3 and 4 if something happened.
End If
End Function
I could handle it with a global variable and an if statement around each function call, but I'd rather not add all that code.
any suggestions would help.
thanks,
Brian
Say I want to skip to line 149 if something happens in line 4
Is there anything like this available in VB?
ex.
line 1 Call Step1
line 2 Call Step2
line 3 Call Step3
line 4 Call Step4
line 5 Call Step5
Public Func_Step1()
If then
Else
Go to line 3 'this would skip step 2 if something happened.
End If
End Function
Public Func_Step2()
If then
Else
Go to line 5 'this would skip step 3 and 4 if something happened.
End If
End Function
I could handle it with a global variable and an if statement around each function call, but I'd rather not add all that code.
any suggestions would help.
thanks,
Brian