Upload file via FTP

R

reidarT

I am trying to upload a file
Dim ftp As Inet
Set ftp = New Inet
'Set ftp = Inet
With ftp
.Protocol = icFTP
.RemoteHost = HostName
.UserName = UserName
.Password = Password
.Execute .URL, "Put " + Lo...

I get an error on Set ftp = New Inet
where the errormessage is 'ActiveX component can't create object'

reidarT
 
T

Terry Kreft

Which library are you using?

I'm guesing that it's the "Microsot Internet Transfer Control", if so this
works fine here so I would try registering the msinet.ocx.
 
D

Douglas J. Steele

Isn't it necessary to add a reference to the Internet Data Transfer Library
(under Tools | References) in order for that code to work, Terry?
 
T

Terry Kreft

That's not what I've found, no.

As I didn't know which library the iNet object came from I tried the
Internet Data Transfer Library first, which didn't work so I removed it and
did a search in the registry for the Inprocserver32 associated with iNet,
which is Microsoft Internet Transfer Control.
 
D

Douglas J. Steele

I get "User-defined type not defined" on

Dim ftp As Inet

when I copy that into a new module (both Access 97 and Access 2003)
 
T

Terry Kreft

Hmm, interesting, that's what I got when I tried the Internet Data Transfer
Library (shdocv.dll), but it worked with Microsoft Internet Transfer Control
(msinet.ocx), I only have A2003 on this machine, the Access version though
should be irrelevant.
 

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