-2
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
Sub AAA()
Dim SourceName As String
Dim Destination As String
Dim R As Long
SourceName = "http://www.cpearson.com/zips/modDownloadFile.zip"
Destination = "D:\Test\modDownloadFile.zip"
R = URLDownloadToFile(0&, SourceName, Destination, 0&, 0&)
If R = 0 Then
Debug.Print "success"
Else
Debug.Print "error: " & CStr(Err.LastDllError)
End If
End Sub
問題是什麼?你正在運行64位Excel嗎? – Jeeped