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

Calling a Fortran DLL in VBA

Roman2
Débutant
1 087 Visites
Hi
I'm new to both... Fortran and VB / VBA ... and I have a simple question... is it possible to call a Fortran DLL from VBA?
I try to get data out of Excel and do the calculation in Fortran... which sends the information back to VBA in order to save it in the Excel file...

Is what I try to do even possible? I read a lot about calling Fortran DLLs in VB Code... but never about calling it in VBA.

Thanks a lot for your help

Greetings
0 Compliments
5 Réponses
anthonyrichards
Nouveau contributeur III
1 087 Visites
This problem has arisen so often here thata simple search of the forum for 'EXCEL Fortran DLL' should throw up lots of helpful links for you.

0 Compliments
Roman2
Débutant
1 087 Visites

hehe okay... sorry about that :)

0 Compliments
DavidWhite
Précieux contributeur II
1 087 Visites
Quoting - Roman

hehe okay... sorry about that :)

Among the threads you may find, this one may be useful.

I recommend that you get dependency walker (free from dependencywalker.com) to help sort out missing DLL's and errors that occur from time to time. Getting the argumnet types and calling conventions on both sides of the call is critical.

I have at least 3 apps running with multiple users all from Excel through VBA to Fortran DLL. If you want any assistance - search the forum and ask for help.

Regards,

David
0 Compliments
anthonyrichards
Nouveau contributeur III
1 087 Visites

I attach the zipped archive mentioned there, with two added screenshots showing the EXCEL worksheet plus VBA code.
0 Compliments
Roman2
Débutant
1 087 Visites
well thanks for the help @ all :) I will try it

greez

0 Compliments
Répondre