52 Bad file name or number - when reading file from FTP

O

Olle

Hi,
My application gets a filename (normally located on the users local drive
(C:\Test\RU012005003.TXT)), opens it and read it. This works without errors.

The User has now moved the file to a FTP site
(ftp://ftp.volvo.se/tovolvo/bengto/RU012005003.TXT) and receives the message:
52 Bad file name or number.
I have traced the code and it stops at: Open bcs_file For Input ....
This is the code:
bcs_file = Application.GetOpenFilename("Text Files (*.txt), *.txt,CSV Files
(*.csv), *.csv,All Files (*.*), *.*", , "Get Flatfile")

If bcs_file = False Then
MsgBox "No file were chosen - the function ends... ", vbExclamation +
vbOKOnly, "Oppps..."
Exit Sub
End If

fileno = FreeFile()
Open bcs_file For Input Access Read As #fileno

Can anyone help me, please.
Regards...Olle
 
P

Patrick Molloy

you should talk to your systems people about this. You can quite easily map a
network drive letter to an FTP address. This would be seamless to Excel &
your file's address would be just liek any other, eg "H:\..." where H would
be mappe dto the FTP address. We have several such as our counterparts send
data to us via FTP and we consume tha data via sevaral applications,
including excel.
 

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