GetObject function

R

R Avery

The last line in the help file for the GetObject function is:

You can't use GetObject to obtain a reference to a class created with
Visual Basic.

Why not? I was hoping to have some COM object (created with VB6, or
maybe VB.NET) that I load into Excel that keeps track of certain
application level events, which I can then call the class of from any
VBA-enabled app using the GetObject function, and get data from it. Is
this not possible?
 
B

Bob Kilmer

It is not possible using GetObject on a VB class. Use C++ to create your
object (I don't know the details, but I am sure they can be looked up.), or
figure out how to use CreateObject to do what you want.
 
R

R Avery

So, suppose I create a VB6 single-instance COM object that runs as an
addin to Excel. Then how would I get a reference to the object from
Outlook so that I can check its properties?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top