Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Excel files from ftp site

Status
Not open for further replies.

yakpol

Structural
Joined
Jun 1, 2001
Messages
450
Location
CA
I am trying to automate retrieving data from Excel file located on ftp site to the master Excel file. The goal is to open the file without typing user name and password every time. I use the following VBA code in master file:
Code:
 Workbooks.Open Filename:=_
 "ftp://user:myname password:mypassword @nontech.com/Proj041202.xls"

Excel continue asking me for a password the first time I run macro, maybe there's a syntax error. Help is greatly appreciated.
 
Try skimming it down to just:

ftp://username:password@nontech.com/Proj041202.xls"

This is how I log in using the Internet Transfer Control in VB.
 
TejuKey,
Thanks a lot, it worked! Meanwile I was accessing ftp files using window scripting, which is different for Win98, 2000 and XP.
 
Hi, I'm trying to enter in the "trimmed down" version of this, but I'm having difficulties making it work. Are all the quotation marks in place in the example? It looks like there are 5 quotation marks... does that make sense? Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top