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

debug dll from VBA-Excel

Intel_C_Intel
Employee
1,431 Views

Hi all,

I used earlier dll's written in CVF6 and I called these from Excel-VBA. I want this now with a dll compiledusing IVF8. Because I want to check the results during operating ( called from Excel) I would like to debugthe dll. How can I do this? In CVF6 I got a hint how to do. In IVF8 I get only a mistakemessage. The next problem will be: As parameter I have a string. How can I transform the VBA-string to the Fortran-string?Where can I read something about using IVF8 compiled dll's in Excel-VBA?Thanks for help, Frank

0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,431 Views
The debugging method is the same. In your DLL project, right click on the project, select Properties, Debug. For the name of the executable, specify the path to Excel and give the path to the xls file as an argument. Set a breakpoint in the DLL and start debugging.

As for strings, the simplest way is to pass it "ByVal" from VBA and accept it in Fortran as CHARACTER(some-fixed-length), then add:

!DEC$ ATTRIBUTES REFERENCE :: stringvar

This is the same as for CVF. Don't forget to make your routines STDCALL.
0 Kudos
jason_beard
Beginner
1,431 Views

OK .. I've got a similar/same problem. I've changed the following fields in the Project | DLL Properties | debugging form

Command: C:Program FilesMicrosoft OfficeOfficeexcel.exe

Command Arguements: "C:Documents and SettingseardjaDesktopMyFile.exe"

I place a breakpoint in the appropriate place in the FORTRAN code and click debug. Get this error ...

"EXCEL.EXE' does not contain debugging information. (No symbols loaded.) Click OK to debug anyway"

I click OK. Nothing happens ... I run the VBA code that invokes the dll ... runs fine but does not stop at my breakpoint.

I found a similar problem in the forum but I seem to have done what was suggested there without success.

Any ideas?

0 Kudos
Reply