Gruppe
Extern
Problem
In das aktive Blatt soll eine downzuladende Grafik aus dem Internet eingefügt werden.
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 pct As Picture
Dim lResult As Long
Dim sURL As String, sLocalFile As String
Range("B7").Select
sURL = Range("B1").Value
sLocalFile = Application.DefaultFilePath & "start2.gif"
lResult = URLDownloadToFile(0, sURL, sLocalFile, 0, 0)
Set pct = ActiveSheet.Pictures.Insert(sLocalFile)
End Sub