Hi
I want to make a web query that copy this page: ipad | eBay in column A from A1.
Than I want to copy the "next page": ipad | eBay in column A from A1001.
Than I want to copy the "next page": ipad | eBay in column A from A2001 etc...
I try this code but it doesnt work
Sub Macro1()
'
' Macro1 Macro
'
'
Dim aa As Integer
Dim bb As Integer
For aa = 1 To 4 Step 1
For bb = 1 To 4001 Step 1000
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=ipad&_pgn=" & aa, _
Destination:=Range("$A$" & bb))
.Name = "i.html?_from=R40&_sacat=0&_nkw=ipad&_pgn=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next bb
Next aa
End Sub
I want to make a web query that copy this page: ipad | eBay in column A from A1.
Than I want to copy the "next page": ipad | eBay in column A from A1001.
Than I want to copy the "next page": ipad | eBay in column A from A2001 etc...
I try this code but it doesnt work
Sub Macro1()
'
' Macro1 Macro
'
'
Dim aa As Integer
Dim bb As Integer
For aa = 1 To 4 Step 1
For bb = 1 To 4001 Step 1000
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=ipad&_pgn=" & aa, _
Destination:=Range("$A$" & bb))
.Name = "i.html?_from=R40&_sacat=0&_nkw=ipad&_pgn=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next bb
Next aa
End Sub