View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
PraxisPete PraxisPete is offline
external usenet poster
 
Posts: 25
Default DLL Entry Points

Hi DM Unseen

I dont fully understand what you mean by having a creatable object in my
DLL. I have search on this and found a lot of information that supports what
you have said, but nothing that I understand enough to implement. Could you
possibly post a simple example? It would really help me out.

Many thanks


"DM Unseen" wrote:

A VB COM/ActiveX component is the best option.

My guess is that you are not just creating any COM/ActiveX component,
but actually an Office COM Addin. For a COM addin you can access it
thru

Applications.Commandins("Myaddin").Object.AddInMsg


Note the declare is not required. Also realise that if you do not need
the COM callback functionality (i.e. you just want a VB library
accessible from VBA) a normal ActiveX will do.

ActveX componenets are objects within VBA just like e.g. the Office
Object library, they are Com libraries that contain objects that need
to be instantiated. After that you can access their methods(your
function) within VBA

so a VB DLL called MyactiveX needs to contain at least one object ie.
Myobject, that is creatable

Then set a reference and use the following code:

DIm newobj as new MyactiveX.Myobject

newobj.AddInMsg

There are a lot of docs on creating standard VB ActiveX components, and
that is all you need.

DM Unseen