Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

IMSL subroutine with excel VBA

Dx
Beginner
418 Views

I have some trouble in using an IMSL subroutine with excel VBA. I tried to create a VBA function which would call this IMSL subroutine. This function worked only one time in a open excel workbook. Whenever I used it at another place in the same excel workbook. Excel would fail and shut down itself automatically. If I write my own Fortran subroutine to replace this IMSL subroutine, everything works fine. But, I still prefer to use the IMSL subroutine if I can get it to work. Does anyone have any suggestions or comments?

Thanks very much.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
418 Views

The IMSL routines require being called with the "C" calling mechanism, but VBA wants to use STDCALL. I don't know if there's a way to tell VBA to use "C". I suggest writing a Fortran jacket routine for the call you want to make.
0 Kudos
Reply