5

My main stationary machine is a Windows box running Win 8.1 64-bit and Office 2013 32-bit. I developed a 32-bit DLL with functions in VS2013 which I include through Excel VBA. Functions work fine on Windows.

Then I have a Macbook Pro running Windows 8.1 64-bit and Office 2010 32-bit under Parallels 8. I do not seem to be able to work with the functions from my DLL under this Mac.

How I tried:

  • Copied my DLL file to a new folder C:\MyTools under Parallels.
  • Referenced this folder when loading the DLL in VBA. My VBA code to load a function from the DLL looks like this

    Declare Function MyDLLfunction Lib "C:\MyTools\MyDLL.dll" (ByVal s As Double) As Double

  • I also tried double slashes \\ to no avail

The undesired result when using this function from my worksheet on Parallels is that there's an error code displayed in the cell (#VALUE).

Is it rather Excel 2010 not being compatible with DLLs in general (can't believe that), or is a matter of referencing the path with the DLL correctly on the Mac? I thought C:\MyTools\MyDLL.dll would work as this is how I see the file in the tree of Windows explorer in Parallels. Or is my Parallels 8 too outdated?

Steve06
  • 741
  • 2
  • 15
  • 32
  • Are you running the macro is Mac OS or Win OS? – Chrismas007 Dec 04 '14 at 20:27
  • Windows running in Parallels. – Steve06 Dec 05 '14 at 00:24
  • This might be a bit late but did you look into registering the DLL in the Parallels 8 Windows? This done using regsvr32, see . This puts an entry in the registry and removes the need for the path in the declare line. This is probably getting done on your dev machine by VS2013. – ChipsLetten Mar 04 '15 at 20:51

1 Answers1

0

This is a shot in the dark, but it could be that your DLL is not compiled as a static library and hence there are certain dependencies which are present on your development computer (because of the Visual Studio installation) which are not there on the test computer/in the parallels environment.

Try running your DLL on Excel on an identical Windows system with no visual studio installed. If it doesn't work, the problem is likely to be as mentioned above.

hnk
  • 2,216
  • 1
  • 13
  • 18