Results 1 to 3 of 3
  1. #1

    "File not found" loading user DLL (Excel 97 and 2000)

    I'm completely stumped by this one! My colleague wrote a function (in Fortran!) to do some hairy statistics, compiled it as a DLL and then wrote some Excel VBA code that calls the function from the DLL.

    In the VBA code the declaration for the function starts like this

    Declare Sub N_E04JYF Lib "c:xxx.dll" (n As Long, ...

    and it is called like this

    Call N_E04JYF(99, ...

    This worked fine on the machine it was created on (Windows 2000 and Excel 2000). He copied it to his his laptop (Windows 98 and Excel 2000) and it also worked fine.

    Now we have tried the same code at my office and we get "Run Time Error '53' : File not found 'c:xxx.dll'" on two different machines (Windows 2000 and Excel 2000, and Windows NT 4 and Excel97).

    We've checked that the case of the filenames agree, put the files in the same directory they were in on the development machine and added that directory to the path, but all to no avail. Has anyone come across this problem before or got any suggestions?

    Thanks, Phil

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: "File not found" loading user DLL (Excel 97 and 2000)

    Did you register the dll on your machine using regsvr32.exe?

  3. #3

    Re: "File not found" loading user DLL (Excel 97 and 2000)

    Thanks for the input Charlotte - we have got to the bottom of it now. The problem was a misleading message. The DLL was OK all along, but it needed to have another DLL present on the machine (the Fortran runtime DLL that comes with the compiler). It was this file that was present on the machines that worked and missing from the ones that didn't.

    So Excel was half-right to complain about a missing DLL- it just completely confused us by putting the wrong file name in the message and claiming that it couldn't find a file that was clearly there!

    Thanks, Phil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts