A
a
rivate 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 myjpg as string
Public Function DownloadFile(ByVal strURL As String, ByVal strLocalFilename
As String) As Long
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, strURL & vbNullChar, strLocalFilename &
vbNullChar, 0, 0)
DownloadFile = lngRetVal
End Function
Command_1_click
myjpg = Application.CurrentProject.Path & "\" & Filename &".jbg"
Call DownloadFile("URL I want to download from here ", myjpg )
End sub
Hi all my friends
I search on the net i find this code to download image jbg from web site
this code have an error I don't know?
this error my duplicate the image
what i mean by duplicate i mean the image take the name i give but not the
image on the web site
is there any wrong in this code
any comments notes
thanks
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal
szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As
Long
Dim myjpg as string
Public Function DownloadFile(ByVal strURL As String, ByVal strLocalFilename
As String) As Long
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, strURL & vbNullChar, strLocalFilename &
vbNullChar, 0, 0)
DownloadFile = lngRetVal
End Function
Command_1_click
myjpg = Application.CurrentProject.Path & "\" & Filename &".jbg"
Call DownloadFile("URL I want to download from here ", myjpg )
End sub
Hi all my friends
I search on the net i find this code to download image jbg from web site
this code have an error I don't know?
this error my duplicate the image
what i mean by duplicate i mean the image take the name i give but not the
image on the web site
is there any wrong in this code
any comments notes
thanks