VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 1  'Persistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "MyVbClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Public HelloMessage As String

Public Sub SayHello()
    MsgBox HelloMessage
End Sub

Public Sub RaiseAnError(newStr As String)
    If (newStr = "US Department of Justice") Then
        Err.Raise 666, "EssenceOfCom.MyVbClass", _
            "You said the name of the Beast"
    End If
End Sub
    
Private Sub Class_InitProperties()
    HelloMessage = "Hello, World from VB"
End Sub

Private Sub Class_ReadProperties(PropBag As PropertyBag)
    HelloMessage = PropBag.ReadProperty("HelloMessage")
End Sub

Private Sub Class_WriteProperties(PropBag As PropertyBag)
    PropBag.WriteProperty "HelloMessage", HelloMessage
End Sub
