
communication with class modules
Hi there
Please help me out with a problem, I'm desperate and just can't find the
solution.
First the code sniplet:
-----------------------------
[class module "TWS_CLASS"]
Public WithEvents myTWS as TWSLib.TWS ' TWSLib.TWS is the class of an
activex-component (*.ocx)
Private Sub Class_Initialize()
Set myTWS = New TWSLib.TWS
End Sub
Private Sub myTWS_connectionClosed()
Debug.Print "conn close"
End Sub
[Module "TWS"]
Private TWS3 As TWS_Class
Sub TestingTWS()
Set TWS3 = New TWS_Class
TWS3.myTWS.Connect "", 7496, 1
TWS3.myTWS.disconnect
End Sub
---------------------------------------
Now, the problem is, if I start the Sub (TestingTWS), it does connect to the
com-component, but the events are not being handled.
I apreciate any help, as I really couldn't get any further and I think it
shouldn't be such a problem.
Viktor