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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading Data from Web with User Name and PassWd

Status
Not open for further replies.

risk99

Technical User
Mar 23, 2003
44
US
Hi, is it possible to tell VBA to download data from a Site which requires user name and password? Thanks!
 
'Maybe you can modify this....(it works with an FTP server)


Sub Return_ftp_folders_and_files()

With ActiveSheet.QueryTables.Add(Connection:="URL;ftp://UserID:password@ftp_server_name/path", Destination:=Range("a1")) 'write web-page to sheet
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

End Sub
 
I could be wrong...but I don't believe that mail servers play by the same rules. :-(
 
Oh ...and an ftp server has "ftp://" in the beginning of the url instead of "http://
 
Here's another thread that talks about this stuff...

thread707-711188
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top