Results 1 to 5 of 5

Thread: File Not Found

  1. #1

    Thread Starter
    Junior Member FAM's Avatar
    Join Date
    Nov 2002
    Location
    Newcastle, UK
    Posts
    29

    File Not Found

    I have a command button in a spreadsheet, which when clicked attempts to call a procedure (ADC1632.dll) which communicates with a port, but the button only works if i open excel.exe then go File>Open and point to the path.

    I want to be able to just click the file and the ADC1632.dll file is found and works fine??, but currently it comes up with the Run time error 53, file not found and it is the line
    ok = adc16_open_unit(Port)
    that is causing the problem, as its the open statement that is not communicating.

    Do you have to declare the open or something?

    Thanks in Advance

  2. #2
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    If its a DLL, you may need to register it first in order for Windows to know where to find it

  3. #3

    Thread Starter
    Junior Member FAM's Avatar
    Join Date
    Nov 2002
    Location
    Newcastle, UK
    Posts
    29
    Ive tried using run and
    regsvr32 C:\Software Development\adc1632.dll
    but i get the error
    LoadLibrary("C:\Software") failed - The specific module could not be found.
    How do i get round this
    Cheers

  4. #4
    New Member
    Join Date
    Aug 2002
    Posts
    5
    Try putting the full path to the dll in the declare statement at the to of your module eg.

    Code:
    Declare Function adc16_open_unit Lib "C:\Software Development\adc1632.dll" ...
    That way you shouldn't need to register the dll.

  5. #5

    Thread Starter
    Junior Member FAM's Avatar
    Join Date
    Nov 2002
    Location
    Newcastle, UK
    Posts
    29
    I tried putting that Declaration in at the top of my Excel VBA code but when the VB opened the sheet it came up with the error
    Compile error:
    Declare statements not allowed as Public members of object modules

    So i then declared it in the *.bas file which communicates with the dll and it seemed to work but when you click the command button to start recording it comes up with Run time error 53, file not found.
    Any suggestions anyone?

Posting Permissions

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



Click Here to Expand Forum to Full Width