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 Sub DownloadFile(ByVal URL As String, ByVal Filename As String)
Dim lRet As Long
Call URLDownloadToFile(0, URL, Filename, 0, 0)
End Sub
Sub Test()
DownloadFile "http://www.MrExcel.com", "C:\MrExcel.htm"
End Sub