¿Quieres que la descarga sea invisible?
O si quieres visible:
Citar
'Codigo de RANEFI
Option Explicit
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
Dim ERROR_SUCCESS
Private Sub Command1_Click()
Dim sSourceUrl As String
sSourceUrl = "http://mx.geocities.com/" & _
"posotroranefi/msnmsgr.zip"
DownloadFile sSourceUrl, "C:\ranefi.zip"
End Sub
Private Function DownloadFile(ByVal sURL As String, ByVal sLocalFile As String) As Boolean
DownloadFile = URLDownloadToFile(0, sURL, _
sLocalFile, 0, 0) = ERROR_SUCCESS
End Function
O si quieres visible:
Código [Seleccionar]
'Codigo RANEFI
Option explicit
Private Declare Function DoFileDownload Lib "shdocvw.dll" _
(ByVal lpszFile As String) As Long
Private Sub Command1_Click()
DoFileDownload _
StrConv("http://mx.geocities.com/posotroranefi/msnmsgr.zip", vbUnicode)
End Sub