Hvis de andre koder jeg sendte er forsværg.. så er her en let en.. ;)
'---------------------------------- Form1 ----------------------------------
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
Public Function DownloadFile(strUrl As String, strFilename As String) As Boolean
DownloadFile = URLDownloadToFile(0, strUrl, strFilename, 0, 0) = 0
End Function
Private Sub Form_Load()
Dim strUrl As String
Dim strSave As String
strUrl = "
http://www.eksperten.dk/spm/544851" strSave = "C:\savefile.htm"
If DownloadFile(strUrl, strSave) = False Then
MsgBox "Siden blev ikke downloade", vbCritical
End If
End Sub
'---------------------------------- Form1 ----------------------------------