stirlingmw1
Board Regular
- Joined
- Jun 17, 2016
- Messages
- 53
- Office Version
- 2016
- 2013
- 2010
- 2007
- Platform
- Windows
I have the following code that stripe the entire webpage from a single url and pastes the data onto "Result" worksheet.
I would like to now modify this code so that it loops through a list of URLs I have on Sheet1 Column A (A1:A558") and paste the return to its on worksheet. Sheet1 Column A has a list of URLs and Column B has a list of the desired Worksheet names.
Can anyone help.
TIA
Steve
VBA Code:
Private Sub UseQueryTable()
Dim url As String
Dim table As QueryTable
url = "Page URL"
Set table = shResult.QueryTables.Add("URL;" & url, shResult.Range("A1"))
With table
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone ' no web formatting.
.Refresh
End With
End Sub
Can anyone help.
TIA
Steve