How do I detect if the program already defined the system variable?

62 views Asked by At

I need to use a system variable VarX within system function DetailLine_Refresh().

When the program executes, function DetailLine_Refresh() will be executed a few times (this is the program design and I can not change anything).

However, system only defined VarX at the second/ third times when the function executed.

Therefore, programs throws an error "Variable not defined" whenever it executes function DetailLine_Refresh() on the first time.

My question is, how do I avoid program to run my if statement below before the program defined the system variable VarX?

Thank you in advance.

Function DetailLine_Refresh()
    If VarX = "A" or VarX = "B" Then
        FunctionAB()
    End If
End Function
0

There are 0 answers