Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29251 Discussions

Excel 2007 vs Excel 2003 access to IVF DLL's

DavidWhite
Valued Contributor II
716 Views

I have been using Excel 2003 through a VBA call to IVF DLL's for some time now without too many issues (except sometimes incompatible DLL's on users machines).

Started testing Excel 2007 today and could not get my Apps to work - Excel VBA did not recognise the DLL's, said that they needed to be registered, which I have not needed to dobefore. regsvr32 would not register my Fortran DLL's.

Is there something I need to do differently for Excel 2007? Am I missing something? Or is it due to running on a different machine that is set up differently?

Add dependencies in the DLL are linked statically, so this should be OK.

I don't get access to the test machine until Wednesday, and I'll only have access for an hour for testing. Any hints would be helpful.

Thanks,

David

0 Kudos
6 Replies
anthonyrichards
New Contributor III
716 Views

Do you mean

regsvr32 "C:Mydll_locationMydll.dll"

fails? With what message?

Try copying the DLL(s) to c:windowssystem32 and then running

regsvr32 "C:windowssystem32Mydll.dll"

Also, perhaps you need to runwith Admin or administratorpermission (are you using Vista?) when running Excel.

What message(s) does Excel 2007 give you (when it objects)? What is the code you use to identify the location of the DLL(s) containing the functions you need to call from VBA?

0 Kudos
Steven_L_Intel1
Employee
716 Views
I just tried the Excel sample we provide and it worked for me in Excel 2007 once I responded to the security prompt about macros (and followed the instructions to edit the DLL location.) No registration required.
0 Kudos
DavidWhite
Valued Contributor II
716 Views

Steve

1. I add the install folder for the DLL's to the user's path (not system path, otherwise I need admin rights).

2. Under XP with Office 2003, the calls from Excel via VBA to the Fortran DLL work without further access.

3. Under XP with Office 2007, I got messages saying that the DLL was not registered.

4. when I attempt to use regsvr32 to register my dll, I get the message "xxx.dll was loaded, but the DllRegisterServer entry point was not found. This file cannot be registered"

Thanks,

David

0 Kudos
Steven_L_Intel1
Employee
716 Views
Don't bother with registration - your DLL isn't meant to be registered.

You don't need to fuss with PATH either, since Excel is loading the DLL using an explicit path (or at least it does in the example I tried - I suppose using PATH might work if the filename in the VBA macro was just a filename.)

As I said, I tried the provided example with Office 2007 on XP and it worked. What is the exact and complete message you saw? Perhaps you can attach a screenshot?
0 Kudos
DavidWhite
Valued Contributor II
716 Views

It was something like "DLL not registered" and I got one message for every call in the worksheet.

I won't have access to the Office 2007 machine until tomorrow morning Australian time. in the meantime, do you know what the XLSTART folderfor Excel 2007 is? If it is notDocuments and SettingsuseridApplication DataMicrosoftExcelXLSTART, then this could be the cause.

Thanks

David

0 Kudos
Steven_L_Intel1
Employee
716 Views
I have not heard of XLSTART before, but on my system there is such a folder. There is also C:Program FilesMicrosoft OfficeOffice12XLSTART.
0 Kudos
Reply