How to include libraries (1 Viewer)

RogerB

Registered User.
Local time
Today, 09:26
Joined
May 25, 2000
Messages
10
I need to include an API library file that will allow me to connect to a non Access database.

In C this would be done with "#include 'file name'".

How is it done in a VBA code module?

Thanks
 

Alexandre

Registered User.
Local time
Today, 15:26
Joined
Feb 22, 2001
Messages
794
Use a Declare statement
Ex:
Code:
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long

See an example code snippet:
API - Delete a file
 

Users who are viewing this thread

Top Bottom