michelxld
Messages postés402Date d'inscriptionvendredi 6 août 2004StatutMembreDernière intervention12 octobre 200831 30 janv. 2005 à 14:33
bonjour
j'espere que cet exemple pourra t'aider
'adapté de http://www.webace.com.au/~balson/InsaneExcel/Web.htm Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Const ERROR_SUCCESS As Long = 0
Sub LancementProcedure()
Dim Source As String, Destination As String
Source = "http://dragonpic.free.fr/Graphics/entree.jpg"
Destination = "D:\Data
\entree.jpg"
DownloadFile Source, Destination
End Sub
Public Function DownloadFile(ByVal sURL As String, ByVal sLocalFile As String) As Boolean
Dim lngRetVal As LongDownloadFile URLDownloadToFile(0&, sURL, sLocalFile, 0&, 0&) ERROR_SUCCESS
End Function