PC Review


Reply
Thread Tools Rate Thread

Accessing events of com objects

 
 
tixover_lives@yahoo.co.uk
Guest
Posts: n/a
 
      2nd Oct 2007
Hi All

first appologies if I get all the terminology wrong, It is ages since
I have done any of this and I am rusty....

I am working with an API which exposes its objects to me but is not
available as an object within excel (late bound??) so I access it
using

Dim MyObj as Object
Set MyObj = GetObject("FOO")

Rather than being able to do:

Dim MyObj as FOO

because the objects are not registered (and I cannot count on them
being on the target machines)

I can access the properties of MyObj at runtime:
Dim MyObj as Object
Dim Counter as integer
Set MyObj = GetObject("FOO")
Counter = MyObj.Count

but I know it has 2 events and I want to be able to catch those (in
WScript I think I can use "ConnectObject") - is there a way of setting
the event handlers to be part of my VBA (either in a class module or
normal module)

T

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RDO (Redemption Objects) with events in VB 6.0 ddvpost@gmail.com Microsoft Outlook Program Addins 1 13th Oct 2006 06:06 PM
VS.Net Dropdowns for objects and Events Tina Microsoft C# .NET 5 15th May 2006 06:24 PM
Dynamic Objects Events Mothi Kannan Microsoft VB .NET 2 13th Oct 2004 09:06 AM
Events, Objects and Classes Gonçalo Boléo Microsoft VB .NET 4 8th Nov 2003 02:32 PM
Events, Objects and Classes Gonçalo Boléo Microsoft Dot NET 2 8th Nov 2003 02:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:21 PM.