#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DLL c++

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default DLL c++

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" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DLL c++

Hello Paul,
thank you. I'll try to do what you suggested...

Lorenzo


Paul G wrote:
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" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"