Call COM Add-in from VBA

D

Doojoo

Hello,

Im writing a COM Add-in for MS-Project (VB.NET / Visual Studio 2005). My
MS-Project file has a macro that creates buttons. On pressing the buttons I
want to call a COM Add-in method.
When starting and close MS-Project the startup and shutdown methods are
called. The method of the button is never called. What am I doing wrong or
does anyone have a working sample?
 
K

Karl E. Peterson

Doojoo said:
Im writing a COM Add-in for MS-Project (VB.NET / Visual Studio 2005).

Excuse my ignorance, but isn't that a fundamental contradiction in terms?
 
D

Doojoo

Considering your reaction I must have described something wrong. But what I
do not know. So perhaps I'm ignorant.
I'm writing an add-in for MS-Project. This add-in is called a COM Add-in
I'm using Visual Studio 2005 an VB.NET.

Perhaps there's now enough information a either shine some ligth on my
ignorance or guide me to a solution of my problem.

Thanks.
 
K

Karl E. Peterson

Doojoo said:
Considering your reaction I must have described something wrong. But what I
do not know. So perhaps I'm ignorant.

Could be me said:
I'm writing an add-in for MS-Project. This add-in is called a COM Add-in
I'm using Visual Studio 2005 an VB.NET.

It just surprises me that Fred can "do" COM, that's all. Certainly, as best I can
recall, that wasn't part of the original spec as COM was at the time considered
obsolete, a thing of the past, something to generally view with total disdain and
scorn.

Perhaps there's now enough information a either shine some ligth on my
ignorance or guide me to a solution of my problem.

I'd say, if you want to get a job done, use a tool designed to do the job. But,
they call me old-fashioned, so maybe that sentiment is also out of style these days?
Ah well.

Good luck...
 
J

Jonathan West

Karl E. Peterson said:
It just surprises me that Fred can "do" COM, that's all. Certainly, as
best I can recall, that wasn't part of the original spec as COM was at the
time considered obsolete, a thing of the past, something to generally view
with total disdain and scorn.

Yes, you can create an COM add-in or ActiveX DLL using VB.NET. It is .NET
internally and has a COM-interop layer to communicate with the outside
world.
 
K

Karl E. Peterson

Jonathan West said:
Yes, you can create an COM add-in or ActiveX DLL using VB.NET. It is .NET
internally and has a COM-interop layer to communicate with the outside
world.

I'll be darned. I guess some things just never truly go out of style, huh? :)
 
K

Karl E. Peterson

Hi Doojoo --
Considering your reaction I must have described something wrong. But what I
do not know. So perhaps I'm ignorant.

No, it turns out I was, to a degree. I've researched this a bit, and (as Jonathan
suggests) it does indeed seem to be not quite as impossible as I at first may have
suggested.
I'm writing an add-in for MS-Project. This add-in is called a COM Add-in
I'm using Visual Studio 2005 an VB.NET.

Perhaps there's now enough information a either shine some ligth on my
ignorance or guide me to a solution of my problem.

Here ya go:

http://www.amazon.com/NET-COM-Compl...0067861?ie=UTF8&s=books&qid=1190197456&sr=8-2

From what I'm told, this is *THE* definitive resource on COM interop. One of the
foremost authorities in the field (Richard Grimes) told me, "point them to Adam
Nathan's book and tell them that to do COM interop right they need to thoroughly
read this 5.3 pound book!"

Have fun... Karl
 

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