communication with class modules 
Author Message
 communication with class modules

Hi there

Please help me out with a problem, I'm desperate and just can't find the

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
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.


Tue, 03 May 2005 03:57:20 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Class modules 97 - Refering to array within a custom class module

2. Accessing procedures of a class module from another class module

3. Circular Reference Between Modules when 2 Class Modules Listen to Each others Events

4. Class Module and Module

5. Class Modules & Modules

6. VB Modules/Class Modules

7. class module vs. module

8. modules and class modules

9. Returning the name of a module/class module

10. Modules or Class modules?

11. Q(VB5) : Different between module & class module

12. Q: Code Module vs UserControl (Form, Class) module.


Powered by phpBB® Forum Software