You need to declare the library outside a sub routine like this
' Declare wininet.dll API Functions
Public Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias
"FtpSetCurrentDirectoryA" _
(ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean
Public Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias
"FtpGetCurrentDirectoryA" _
(ByVal hFtpSession As Long, ByVal lpszCurrentDirectory As String,
lpdwCurrentDirectory As Long) As Boolean
It depends on what type of dll you mean. Try Tools / References, scroll down
and tick the "description" of the dll. Note this is not normally the file
name.
If not in the list use "browse" to file. If it doesn't 'take' either it's
not registered on your system or it's not a dll that requires a reference
nor one you'll see in Object Browser, refer to Joel's example.
Regards,
Peter T
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.