List download failed URLs in another sheet

Sunil7598

New Member
Joined
Dec 28, 2022
Messages
20
Office Version
  1. 2016
Platform
  1. Windows
Hi Guys,

I have below code to download images from url in excel. Hence problem is not all files are downloading & I want to list those urls in another.

Sub dwl_front()

Dim ie As Object

lr = Cells(Rows.Count, 1).End(xlUp).Row

DPath = Sheet1.Range("F8").Value

If Len(Dir(DPath, vbDirectory)) = 0 Then
MsgBox "Enter a Valid Download Path", vbExclamation, "Error!"
Exit Sub
End If


Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True


sr = 6
er = Range("F9").Value + 1
'er = sr - 1
'DPath = Range("g5").Value
For i = sr To er

URL = ""
URL = Range("B" & i).Value

ie.navigate URL

Do While ie.Busy
DoEvents
Loop
Application.Wait (Now() + TimeValue("0:00:03"))
Application.SendKeys ("^s")
Application.Wait (Now() + TimeValue("0:00:06"))

'Filename:=fldrpth & "\" & "Churn Reminder - " & Format(Date, "dd-mm-yyyy") & "", FileFormat:=51

Application.SendKeys DPath & "\" & Range("A" & i).Value & ".JPEG"
Application.Wait (Now() + TimeValue("0:00:03"))

Application.SendKeys ("~")




Application.Wait (Now() + TimeValue("0:00:06"))




Next i

ie.Quit

MsgBox "Download Completed. Check Status"


End Sub


Thanks in Advance
 

Attachments

  • 1675170810714.png
    1675170810714.png
    30.9 KB · Views: 10

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top