Sorry but I don't agree with you still. Your maybe work for constant but I need to have counter variable inside the class. Like this one:
Class modules :: TCustom_Object
Private p_sheet As Worksheet
Private p_left as Integer
Public count As Integer
Private Sub Class_Initialize()
' constructor
count = 0
End Sub
Private Sub Class_Terminate()
' destructor
End Sub
Public Property Let left(vdata As Integer)
p_left = vdata
End Property
Public Sub proccess1()
.... ' some code here
count = count + 1
End Sub
This is my class module. It's all about how to stay alive during full Excel's session. When Excel's terminating I want to show count variable of the object. That's all. But now everytime I call obj.proccess1 both constructor & destructor is called -> no old count status...
Problem still persists but THX for your effort !
Bookmarks