#if Win64 Then
Private Declare PtrSafe 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 #Else 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 #End If Function DownloadFileFromWeb(strURL As String, strSavePath As String) As Long On Error Resume Next DownloadFileFromWeb = URLDownLoadToFile(0, strURL, strSavePath, 0, 0) End Function |