VARIABLE LIFE AND SCOPE:
You must create a variable to hold a reference to the AppSentinel object.
All sample programs use a global variable named gobjAppSentinel.
It is recommended that AppSentinel be instantiated in the Load event
of your first form or at the start of your Sub Main routine. The variable
should exist until your application terminates, i.e. the Unload event of
your last form or at the end of your Sub Main procedure.
If your application can end from multiple points in code, it must
properly dispose of AppSentinel prior to ending by setting the
object variable to Nothing. For example:
Set gobjAppSentinel = Nothing
If AppSentinel is destroyed and recreated during a single session of your
application, the TotalRuns of your program as reported by AppSentinel
will be higher than the true value possibly causing your trial period to
prematurely expire.
Also, if you terminate your application using the END statement,
you must set the variable holding a reference to AppSentinel to
Nothing first. Otherwise AppSentinel may always report the
TotalRuns of your application as 1.
Incorrect: ....
END
Correct: Set gobjAppSentinel = Nothing
END