Hi Guys,
am using Internet explorer to download images from links. but problem is while running macro if switch to any window like chatbox it's typing that file name and path there.
I tied a lot of options but failed.
The code am using is
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
Dim rng As Range, cl As Range
Set rng = Range("A6:A" & lr)
'sr = 6
'er = Range("F9").Value + 1
'er = sr - 1
'DPath = Range("g5").Value
For i = 6 To lr
Cells(i, "A").Select
If ActiveCell.EntireRow.Hidden = False Then
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
ie.Visible = True
Application.SendKeys DPath & "\" & Range("A" & i).Value & ".JPEG"
Application.Wait (Now() + TimeValue("0:00:03"))
Application.SendKeys ("~")
else
end if
ie.quit
am using Internet explorer to download images from links. but problem is while running macro if switch to any window like chatbox it's typing that file name and path there.
I tied a lot of options but failed.
The code am using is
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
Dim rng As Range, cl As Range
Set rng = Range("A6:A" & lr)
'sr = 6
'er = Range("F9").Value + 1
'er = sr - 1
'DPath = Range("g5").Value
For i = 6 To lr
Cells(i, "A").Select
If ActiveCell.EntireRow.Hidden = False Then
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
ie.Visible = True
Application.SendKeys DPath & "\" & Range("A" & i).Value & ".JPEG"
Application.Wait (Now() + TimeValue("0:00:03"))
Application.SendKeys ("~")
else
end if
ie.quit