'使用 URLDownloadToFile 这个API可以实现你想要的功能。
'声明API函数
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
'下载网页源码
Public Function DownloadFile(ByVal strURL As String, ByVal strFile As String) As Boolean
Dim lngReturn As Long
lngReturn = URLDownloadToFile(0, strURL, strFile, 0, 0)
If lngReturn = 0 Then DownloadFile = True
End Function
Private Sub Command1_Click()
Debug.Print DownloadFile("
http://zhidao.baidu.com/question/12376048.html", "D:\1.html")
End Sub
或者使用WinHTTP、XMLHTTP对象