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
Sub Mysub()
your code
exit sub
"Mac Lingo" wrote:
> How do I add a reference to a new DLL to my object brower to be able to use
> in in VBA 2003?
>
> Mac in Berkeley, CA
>
>
>
|