Class TestClass
Private Sub Class_Initialize
WSH.Echo "TestClass start...."
End Sub
Public Sub Class_Terminate
WSH.Echo "TestClass terminated...."
End Sub
End Class
Set obj = New TestClass
Set obj = nothing
1. Initialize 事件在创建类的实例时发生此事件2. Terminate 事件在所关联的类的实例终止时发生此事件。 Class TestClass Private Sub Class_Initialize WSH.Echo "TestClass start...." End Sub Public Sub Class_Terminate WSH.