'###############################################################
'函数作用:下载文件到指定目录
'###############################################################
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal strURL As String, _
ByVal strFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Sub DownFile()
Dim lReturn As Long
Dim URL As String
Dim fname As String
URL = "[img]http://home.tinp.net.tw/mypage/00057063/web004.jpg[/img]"
fname = "C:\test\tesp.jpg"
lReturn = URLDownloadToFile(0, strFullURL, strLocation, 0, 0)
If lReturn <> 0 Then Call MsgBox("连接失败")
End Sub
联系客服