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