Sequence Determines How You Must Declare Code
Siebel Tools compiles custom methods in alphabetical order. If
you reference code in the current code before you define it, then
you must use a declaration. For example, assume you create the following
subroutines in the general declarations section:
Sub A
' Calling B
B
End Sub
Sub B
theApplication.RaiseErrorText "Sub B called"
End Sub
In this situation, compilation fails with the following message:
Unknown function: B
If you add the following statement before Sub A, then the code
compiles and runs properly:
Declare Sub B