Dim strURL As String
Dim bData() As Byte
Dim intFile As Integer

strURL = "http://localhost/aaa/1/3/test1.jpg"
intFile = FreeFile()      ' Set intFile to an unused file.
bData() = Inet1.OpenURL(strURL, icByteArray)

Do Until Inet1.StillExecuting = False ' WAIT DOWNLOADING...
Open "C:\test1.jpg" For Binary Access Write As #intFile      
      Put #intFile, , bData()
Close #intFile

Is there a way to to validate or identify first if the URL is existing or valid.

I'm writing a program that will download a file from the website but before downloading the file, I want to make sure that the file exist and do something else...