bonsoir JG
je ne suis pas sur que ce soit exactement ce que tu recherches , mais la macro ci dessous permet de telecharger un document
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
'adapté de http://www.webace.com.au/~balson/InsaneExcel/Web.htm
Private Const ERROR_SUCCESS As Long = 0
Sub LancementProcedure()
Dim Num As Byte
Dim i As Integer, Longueur As Integer
Dim NomPage As String, Chemin As String
Chemin = "http://www.monSiteInternet.com/Classeur.csv" 'adapter le chemin
Longueur = Len(Chemin)
i = Longueur
While Mid(Chemin, i, 1) <> "/"
i = i - 1
Wend
NomPage = Mid(Chemin, i + 1, Longueur - i)
Num = InStr(1, NomPage, ".") - 1
DownloadFile Chemin, ThisWorkbook.Path & "\" & Left(NomPage, Num) & _
Right(NomPage, Len(NomPage) - Num)
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
bonne soirée
MichelXld