langevin
07-19-2010, 10:50 AM
Hello everybody :hi:
I'm wondering if you could help me. I'm trying to download a file on the web from Excel via the URLDownloadToFile functions.
When i run the code below, it seems to work and i get the Msg box saying the download is finished but when i look at the folder, the file isn't there.
Do you know what is happening ?
Thank you for you help :)
Gilles
'Declarations
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
' Download Code
Sub download()
URLDownloadToFile 0, "mylink", "C:/cdm.xls", 0, 0
MsgBox "File have been downloaded!"
End Sub
I'm wondering if you could help me. I'm trying to download a file on the web from Excel via the URLDownloadToFile functions.
When i run the code below, it seems to work and i get the Msg box saying the download is finished but when i look at the folder, the file isn't there.
Do you know what is happening ?
Thank you for you help :)
Gilles
'Declarations
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
' Download Code
Sub download()
URLDownloadToFile 0, "mylink", "C:/cdm.xls", 0, 0
MsgBox "File have been downloaded!"
End Sub