Sanign

Hi! I have created a Win32 DLL project to connect a few functions written in C++ with excel through VBA. Everything works perfectly well in the computer where I have Visual C++ 2005 installed, and I can use the C++ function via the DLL with no problem, nevertheless when I try to use it in another computer where Visual C++ is not installed, the DLL does not work and it seems as if Visual Basic didn't find it...

Can anyone give a hint on this

Thanks in advance



Re: Visual C++ General Problems connecting C++ and VBA using a DLL

Mike Danes

You must install this on the computer without VC++ installed

http://www.microsoft.com/downloads/details.aspx FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&DisplayLang=en

and the dll must be compiled in Release mode, not Debug. Debug does not work on computers where VC++ is not installed.

See this post also:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=398802&SiteID=1





Re: Visual C++ General Problems connecting C++ and VBA using a DLL

Samuel Hobbs

 Mike Danes wrote:

You must install this on the computer without VC++ installed

http://www.microsoft.com/downloads/details.aspx FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&DisplayLang=en

It is not necessary to install that specifically. It is necessary to install the items that the application needs. The typical method used to do that is a setup program specific to the application. For simple applications in which a simple solution is reasonable, the general-purpose installation progam can be useful.

Another reasonable solution is to create a static build.

There are advantages and disadvantages to all these possibilities. The advantage of the general-purpose installation progam is that it installs stuff that is useful to have installed whether they are used by the application or not.






Re: Visual C++ General Problems connecting C++ and VBA using a DLL

Sanign

Thank you very much indeed for your help on this!!

Both links were exactly what I was looking for!!

Thank you very much Mike !!





Re: Visual C++ General Problems connecting C++ and VBA using a DLL

Sanign

I will also try this, because it also looks very good too.

Thank you very much for your help Samuel!!