VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "TestClass"
Attribute VB_Creatable = False
Attribute VB_Exposed = True
Option Explicit

Dim v As Long
Dim s As Byte

Const sNormal = 0, sAbnormal = 1

Private Sub Class_Initialize()

MsgBox "Object initialization OK"
Style = sNormal

End Sub


Private Sub Class_Terminate()

If Style = sAbnormal Then
   Beep
   TestForm.Blink
End If
MsgBox "Object will be destroyed. Property Value was " & Value()

End Sub



Public Property Get Value()

Value = v

End Property

Public Property Let Value(vNewValue)

v = vNewValue

End Property

Public Sub ShowPublicHello()

MsgBox "Hello, world! My Value is " & Value
Style = sAbnormal

End Sub

Private Sub ShowPrivateHello(ThisIsAByRefParameter, Optional ByVal ThisIsAByValParameter)

MsgBox "Hello fellow!"

ThisIsAByRefParameter = "This isn't dead"
ThisIsAByValParameter = "This is dead"

End Sub

Private Property Get Style()

Style = s

End Property

Private Property Let Style(vNewValue)

s = vNewValue

End Property



