DLL c++

  • Thread starter Thread starter Lore
  • Start date Start date
L

Lore

Hello.
I've been looking for info for a while but unfortunately I was not able to
find out anything useful

How should I create a C++ DLL so that I can referece it from VBA?
I can create functions and use them in Excel using Declare [...], but this
is not what I would like to do.
I'd like to use, from VBA, Tools->Refereces and from that form load the DLL,
but I can't do so, as I always get the same error "Unable to add a reference
to this file" (maybe words in English are not exactly those, I'm translating
from Italian...)

Many thanks,
Lorenzo
 
Ok, in c++ you'll have to create an active-x dll. This will allow you to
create a type library that will allow you to reference it from the
tools:references...

Sounds to me like you are creating a normal Dll which isn't COM(active-x).
If you have a normal DLL you have to use Declare .....blah blah.

Hope that points you in the right direction.
 
Hello Paul,
thank you. I'll try to do what you suggested...

Lorenzo


Paul said:
Ok, in c++ you'll have to create an active-x dll. This will allow you to
create a type library that will allow you to reference it from the
tools:references...

Sounds to me like you are creating a normal Dll which isn't COM(active-x).
If you have a normal DLL you have to use Declare .....blah blah.

Hope that points you in the right direction.

Lore said:
Hello.
I've been looking for info for a while but unfortunately I was not able to
find out anything useful

How should I create a C++ DLL so that I can referece it from VBA?
I can create functions and use them in Excel using Declare [...], but this
is not what I would like to do.
I'd like to use, from VBA, Tools->Refereces and from that form load the DLL,
but I can't do so, as I always get the same error "Unable to add a reference
to this file" (maybe words in English are not exactly those, I'm translating
from Italian...)

Many thanks,
Lorenzo
 

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

Back
Top