Given a web address which contain an image (different image on everyday). Is it possible to download the image and save to a specific location on harddrive?
Thanks.
Printable View
Given a web address which contain an image (different image on everyday). Is it possible to download the image and save to a specific location on harddrive?
Thanks.
yes!
put an internet transfer control and a command button onto a form and paste this in:
(it's a picture of me)
------------------Code:Private Sub Command1_Click()
Dim localFile As String
Dim remoteFile As String
Dim fNum As Long
Dim b() As Byte
remoteFile = "http://graffiti.virgin.net/dms.mbs/images/mark.jpg"
localFile = "C:\temp\mark.jpg"
fNum = FreeFile
' Retrieve the file as a byte array.
b() = Inet1.OpenURL(remoteFile, icByteArray)
Open localFile For Binary As #fNum
Put #fNum, , b()
Close #fNum
MsgBox "Done"
End Sub
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company