Calling DLL function

G

Guest

Hi all,

I am working on Excel 2007 Beta version.
I am facing a problem while calling a DLL in VBA for Excel 2007.
My DLL is located at the currrent directory location and i have declared it
in my VBA code as follows

Private Declare Sub table Lib "numTable.dll" (ByVal n As Integer, ByRef arr
As Long)

I have placed a command button on the worksheet to call the DLL's function.
But it gives error on clicking the button which says numTable.dll missing. I
have to call the DLL without changing its location i.e. current directory.
 
N

NickHK

This is standard windows DLL ? i.e. not an ActiveX DLL made with something
like VB5.

Are any dependencies of this DLL missing. You can check with Dependecy
Walker, free download:
http://www.dependencywalker.com/

Have you checked the current directory and current drive ?
?CurDir

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top