For Each Number In accountNumber
Dim urlString As String
urlString = "http://www.prad.org/CamaDisplay.aspx?OutputMode=Display&SearchType=RealEstate&ParcelID=" & accountNumber.Value
Set dataSet = ActiveSheet.QueryTables.Add( _
Connection:="URL;urlString, _
Destination:=ThisWorkbook.Worksheets(2).Range("A1"))
I am attempting to loop through the values Number
in a column range accountNumber
, adding them to the end of the URL
given. This will ultimately visit multiple webpages, adding to the QueryTables
each time.
Answer for length :
From previous question:
You stated you were getting an Invalid Web Query. i don't think you need to append all values to one query. i think you need to run multiple queries, each with one value from the range.
I also think it's not going to be a good idea to have the same destination for all of them.