|
-
Mar 4th, 2003, 06:19 AM
#1
Thread Starter
Junior Member
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
-
Mar 4th, 2003, 07:45 AM
#2
Frenzied Member
If its a DLL, you may need to register it first in order for Windows to know where to find it
-
Mar 4th, 2003, 11:40 AM
#3
Thread Starter
Junior Member
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
-
Mar 5th, 2003, 06:35 AM
#4
New Member
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.
-
Mar 6th, 2003, 06:42 AM
#5
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|