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

Fortran DLL and VBA

chinhqnguyen
Beginner
652 Views
I am trying to run a FORTRAN 90 DLL in a VBA Excel application. My fortran program has a lot of mathematical functions such as: COS, SIN, SQRT,NINT, etc. I use Compaq Visual Fortran 6.6 compiler to create the DLL file. Each time I try to run this DLL in my VBA program the following error message appears:

?Run time error 53, File Not Found ...?.

When I remove those mathematical functions from my Fortran codes and leave simple operations there, the DLL just works fine. I appreciate if you can help me in this regard.
0 Kudos
4 Replies
Steven_L_Intel1
Employee
652 Views
0 Kudos
chinhqnguyen
Beginner
652 Views

Hi Steve,

Thank you for your respond. I tried what you mentioned and I got the same error message

"Run time error '53'
File Not Found ......"

Do you have any other suggestion?

- Peter -
my email addresses are
CQTran@cessna.textron.com
chinhqnguyen@yahoo.com

0 Kudos
Steven_L_Intel1
Employee
652 Views
Make sure your DLL is built in a "Release Configuration" and not "Debug Configuration".

Steve
0 Kudos
chinhqnguyen
Beginner
652 Views

Hi Steve,

I GOT IT , Steve :-) :-) :-) :-)
Exactly as you said, my project has been built in "Debug Configuration" so it caused me many troubles when I tried to call Fortran subroutines in the VBA program. After changing to "Release Configuration", my program is running very fine.
Thanks you for your help.

Again thank you very...very...very... much, Steve.
Have a good day, Steve

- Peter -
0 Kudos
Reply