ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






EVENT:  Terminate

Terminate

VBScript 5.0

The Terminate event is an optional subroutine that can be called when you terminate an instance of an object using the Class ... End Class statement. You can place any valid VBScript code inside the subroutine that you want to run when the class is terminated.

The similar Initialize event can be called when you create an instance of an object.

Note, as shown in the code example, that the subroutine name must be composed of the class name, an underscore ( _ ) and the word Terminate().

Code:
Private Sub YourClassName_Terminate()
   'place any valid VBScript code here
End Sub