locked
Dll not detected in Excel 2003, but detected in Excel 2010 RRS feed

Answers

  • I used dependencywalker.exe to check if there's missing dll in the target computer, and found out dll -msvcr100D.dll and msvcp100D.dll were not in the target computer.

    After I installed those dll in the windows/system32 folder, "my dll not found" error was solved. "my dll not found" (Runtime error 53) mislead to me that my dll was not placed in the correct file path. because the error does not clearly specify which dll was missing. Any unaccessible dll even dll dependency was missing cause the same error.


    Jason

    • Marked as answer by Jason2726 Friday, February 8, 2013 8:10 AM
    Friday, February 8, 2013 8:10 AM

All replies

  • Sorry, I need to post blank question at first because I was unable to write question in details into the body.

    This is my problem:

    I wrote a VC++ dll which was proven no problem to run it in my laptop using Ms Excel 2010 VBA.

    However when I copied the same dll to other computer at the same location like what I did in my laptop, and run it using MS Excel 2003, the Excel 2003 prompted error - unable to detect the dll.

    I wonder why the problem can happen as I used same dll which is stored at the same file path for both computer, and used same VBA code?


    Jason

    Monday, February 4, 2013 4:28 AM
  • Just now, I created a common Excel File ( 2003), and then saved dll into the same directory for both different computer (my laptop vs other person computer). Run the VBA code that call the dll to show a message, only my laptop is able to show message, while the other computer prompt out Runtime Error 53. How can this happen-same file, same dll, same dll file location?

    Jason

    Monday, February 4, 2013 6:52 AM
  • is there hidden requirements for running dll in MS Excel 2003 compared to MS Excel 2010?

    Jason

    Monday, February 4, 2013 9:57 AM
  • Did you add the dll as a reference in the case of XL03? 


    HTH,

    Eric

    Tu ne cede malis sed contra audentior ito.

    Explicit hoc totum,
    Pro Christo da mihi potum.

    Monday, February 4, 2013 1:49 PM
  • On the problem machine make sure the folder that the DLL is in is on your path, or put it in folder that you know is on your path like C:\Windows\system32.
    Monday, February 4, 2013 2:25 PM
  • I declared the dll path as below:

    Public Declare Function TestReturnStringD Lib "D:\Win32ProjectDummy.dll" () As Variant

    I don't see anything wrong with the declaration, but Excel 2003 can't find the dll....it's weird.


    Jason

    Monday, February 4, 2013 2:37 PM
  • Did you register the DLL?  If you select References in VBA can you surf to the DLL and select it as a reference?

    HTH,

    Eric

    Tu ne cede malis sed contra audentior ito.

    Explicit hoc totum,
    Pro Christo da mihi potum.

    Monday, February 4, 2013 2:50 PM
  • Eric,

       No, I did not register it as COM object so I will not able to see the dll when I clicked reference in the VBA. I don't think it's required to register it as COM object as it's not developed using .NET. Furthemore, there's no problem to detect the dll if I use MS Excel 2010 to run the dll.


    Jason

    Monday, February 4, 2013 2:56 PM
  • My quick search indicates that Runtime Error 53 is "File Not Found".  So, is your libname correct?  Do you actually have the dll in D:\ ?

    HTH,

    Eric

    Tu ne cede malis sed contra audentior ito.

    Explicit hoc totum,
    Pro Christo da mihi potum.

    Monday, February 4, 2013 3:24 PM
  • Yes. the dll is there, at the location exactly same as declared in the VBA.

    Jason

    Monday, February 4, 2013 11:25 PM
  • These are the efforts I have tried:

    1. Login the computer as adminstrator, and then try to run the VBA.

         Result: Runtime error 53, dll was not found

    2. Transfer the dll to Windows/System32 folder, updating dll file path declaration in the VBA, and then run the VBA

       Result: Runtime error 53, dll was not found

    3. Commented the dll, and then declare other dll that originally located in the windows/system32 folder, declare the dll in the VBA, and then run the VBA

      Result: No error.

    This means my dll which only can be used (no Runtime error 53) in my laptop only, can't be used in other computer. My question how to make my dll (compiled through Win32 project, VC++) can be used in any computer? is it I need to register the dll into GAC before I can use?


    Jason

    Wednesday, February 6, 2013 11:59 AM
  • Please help..............

    Jason

    Friday, February 8, 2013 6:33 AM
  • I used dependencywalker.exe to check if there's missing dll in the target computer, and found out dll -msvcr100D.dll and msvcp100D.dll were not in the target computer.

    After I installed those dll in the windows/system32 folder, "my dll not found" error was solved. "my dll not found" (Runtime error 53) mislead to me that my dll was not placed in the correct file path. because the error does not clearly specify which dll was missing. Any unaccessible dll even dll dependency was missing cause the same error.


    Jason

    • Marked as answer by Jason2726 Friday, February 8, 2013 8:10 AM
    Friday, February 8, 2013 8:10 AM