Hi everyone,
I'm having one trouble trying to connect vba with fortran, I created one simple dynamic library with the meta-commands that are need to make the connection and it works fine, but in one complex program it isn't running.
In the first example, I created one sub in vba that call the subroutine 'Simples' of Fortran, passing one variable 'd' by reference, in 'Simples', the values 'a', 'b', 'c' were filled and that subroutine call 'Soma', passing a,b,c and d, then 'Soma' use the formule 'd = a + b + c', when the variable 'd' return from the call, its value is 60 and it is printed in the cell(1,1). I just use meta-commands in one subroutine in fortran and it works fine!
But, When I use a similar program with one quimic process model, the vba close very fast! I wrote meta-commands only in the main. There are many reads of files in fortran model, this use 'paramater', 'common' and another things, Can it be the reason of trouble? Or Am I doing something wrong?
If I can't use .dll to connect this complex program with vba, Can I use .exe to connect this two languages?
Thank you for answers, have a good day! (I attached some program's pictures)