Attribute VB_Name = "Module1"
Public Sub Main()
    Dim objTest As Object

    Set objTest = CreateObject("CTestProj.CTest")

    Debug.Print "Root Object:"
    Debug.Print vbTab & "Context ID     = " & objTest.contextID
    Debug.Print vbTab & "Activity ID    = " & objTest.activityID
    Debug.Print vbTab & "Transaction ID = " & objTest.transactionID
    Debug.Print

    objTest.CreateChild
    Debug.Print "Child Object:"
    Debug.Print vbTab & "Context ID     = " & objTest.child.contextID
    Debug.Print vbTab & "Activity ID    = " & objTest.child.activityID
    Debug.Print vbTab & "Transaction ID = " & objTest.child.transactionID

End Sub

Public Sub Main2()
    Dim objTest As Object

    ' Initialize
    Set objTest = CreateObject("CTestProj.CTest")

    ' Create child using CreateObject.
    objTest.CreateChild
    MsgBox "Root object context ID = " & objTest.contextID & vbCrLf _
        & "Interior object context ID = " & objTest.child.contextID, vbOKOnly, _
        "CreateObject"

    ' Create child using the New operator.
    objTest.CreateChildUsingNew
    MsgBox "Root object context ID = " & objTest.contextID & vbCrLf _
        & "Interior object context ID = " & objTest.child.contextID, vbOKOnly, _
        "CreateObject"

End Sub



