
communication with classmodules
purchase, read and love the VBA Developer's Handbook from Sybex at
Amazon.
like this:
Quote:
>Hi there
>Please help me out with a problem, I'm desperate and just can't find the
>solution. I think I just do something wrong to communicate with the class
>module, but see yourself.
>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
Steve Hudson -- Word Heretic, Sydney, Australia
{*filter*} teacher, trainer, tutor, writer, developer
Word MVP FAQs: http://www.*-*-*.com/
You agree by writing to me personally that any material can be reused publicly unless you explicitly disclaim it. (For List and blog use.)