Hi to all. i have the following problem when i try to call a dll file from VBA as shown below ------------------ Private Declare Sub SimpleTest Lib "c:\SimpleTest\SimpleTest.dll" (x As Variant, y As Variant) Public Sub Test() Dim x As Variant Dim y As Variant Call SimpleTest(x, y) End Sub ------------- i get the following error --------------- Run-time error '453' Can't find DLL entry point SimpleTest in c:\SimpleTest\SimpleTest.dll ---------------- the dll file is a test dll file that i create in Digital visual fortran 6.0.A (below is the Fortran code that i used in order to build the DLL file) --------------------- program SimpleTest real x real y x=3 y=2+x end program SimpleTest ----------------------- I am Trying to call dll files(fortran files converted to dll) from VBA. But with no luck at all. Finally i tried to make the above connection but nothing! Please help me!!! Thanks a lot!!!
As you have understand i haven't done anything like this again, so could you be more specific? Thanks again Bill
I don't know how to do it in Fortran but in C++ there's a .DEF file which contains an EXPORTS section. This section declares all publicly accessible entry points into the DLL. In addition, exported functions also include the WINAPI macro as part of their signature.