Download aus dem Internet Teil2
16.04.2008 16:31:00
webxite
Hallo liebe Excel Freunde!
Ich bin jetzt soweit das er sich einloggt um die Datei runterzuladen. Mein Problem ist das er die Datei öffnet statt unter C:\Temp zu speichern.
Ich hoffe ihr könnt mir helfen.
StandardModule: Modul1
Private Declare
Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL$, _
ByVal szFileName$, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Sub Downl()
Dim lResult As Long
Dim sURL$, sLocalFile$
sURL = "https://www.herber.de/bbs/texte/ _
11names.xls"
sLocalFile = Application.DefaultFilePath & "\11names.xls"
lResult = URLDownloadToFile(0, sURL, sLocalFile, 0, 0)
Workbooks.Open Application.DefaultFilePath & "\11names.xls"
End Sub