Hey all,
This is my first post to Mr.Excel, so let me know if I can do anything to improve this post.
Im new to VBA and am stuck on a project I've taken on.
Im trying to use VBA to loop through a list of URLs and import the image source from each website. This is the code I have so far:
Public Sub Asins()
Dim IE As Object
Dim rng As Range, cell As Range
Dim URL As Range
Dim imgSrc
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
For Each URL In Range("A1:A3260")
.navigate URL.Value
While .busy Or .readyState <> 4: DoEvents: Wend
' This is where Im stuck. I need to print the image source of each URL next to its corresponding cell
' Set imgSrc = IE.document.getElementById("imageProduct")
' = imgSrc.getAttribute("src")
Next
End With
End Sub
Thanks for your help
This is my first post to Mr.Excel, so let me know if I can do anything to improve this post.
Im new to VBA and am stuck on a project I've taken on.
Im trying to use VBA to loop through a list of URLs and import the image source from each website. This is the code I have so far:
Public Sub Asins()
Dim IE As Object
Dim rng As Range, cell As Range
Dim URL As Range
Dim imgSrc
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
For Each URL In Range("A1:A3260")
.navigate URL.Value
While .busy Or .readyState <> 4: DoEvents: Wend
' This is where Im stuck. I need to print the image source of each URL next to its corresponding cell
' Set imgSrc = IE.document.getElementById("imageProduct")
' = imgSrc.getAttribute("src")
Next
End With
End Sub
Thanks for your help