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()
DownloadFile '[B]Lien supprimé[/B], 'C:\\monImage2.gif'
End Sub
Public Function DownloadFile(ByVal sURL As String, ByVal sLocalFile As String) As Boolean
Dim lngRetVal As Long
DownloadFile = URLDownloadToFile(0&, sURL, sLocalFile, 0&, 0&) = ERROR_SUCCESS
End Function