Hi,
I'm trying to import multiple URL's into a spreadsheet. I have the URL address in C69-C80. I've tried to double up the code and it just erases the first query after importing the second. How do I loop through each URL, import it and place them one after another?
Thanks.
I'm trying to import multiple URL's into a spreadsheet. I have the URL address in C69-C80. I've tried to double up the code and it just erases the first query after importing the second. How do I loop through each URL, import it and place them one after another?
Thanks.
VBA Code:
Dim rngAnchor As Range
Dim strQuery As String
strQuery = ws6.Range("C69")
With ws2
Set rngAnchor = .Range("A2")
With .QueryTables.Add(Connection:=strQuery, Destination:=rngAnchor)
.Refresh BackgroundQuery:=False
End With
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Rows("3:" & LastRow).RowHeight = 12
End With