Sub Class_Globals
Private mValue As Int
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
mValue = 0
End Sub
Public Sub AddThis(Value As Int) As AddTool
mValue = mValue + Value
Return Me
End Sub
Public Sub Total As Int
Return mValue
End Sub
Edit: It is hard to give an answer faster than Erel.
Sub Class_Globals
Private mValue As Int
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
mValue = 0
End Sub
Public Sub AddThis(Value As Int) As AddTool
mValue = mValue + Value
Return Me
End Sub
Public Sub Total As Int
Return mValue
End Sub
Edit: It is hard to give an answer faster than Erel.