For some reason my code is no longer working to download the image on my website:

Code: Code:
  1. Private Sub DownloadImage()
  2. If InStr(source, "image of the day") Then
  3. WebBrowser1.SetFocus
  4. SendKeys ("{PGDN}")
  5.  
  6. Dim img As HTMLImg
  7.    For Each img In WebBrowser1.Document.images
  8.       If InStr(img.src, "vimage") Then
  9.    
  10.        Dim tData() As Byte
  11.        Dim iFile As Integer
  12.        Dim sURL As String
  13.  
  14.       sURL = img.src
  15.  
  16.    
  17.         iFile = FreeFile
  18.         tData = ctlInet.OpenURL(sURL, icByteArray)
  19.       Open App.Path & "\image.jpg" For Binary As iFile
  20.         Put #iFile, , tData()
  21.        Close iFile
  22.       End If
  23.     Next
  24.  
  25. End If