Gaston0327
New Member
- Joined
- Jul 1, 2012
- Messages
- 2
Hi there,
I have the following macro which pulls several tables from an internet page.
Verb Macro
'
' Keyboard Shortcut: Ctrl+z
'
Sheets("Sheet5").Select
ActiveCell.Select
Sheets("Sheet5").Select
ActiveCell.Cells.Select
Selection.Delete Shift:=xlUp
ActiveCell.Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.verbs.cat/es/conjugacion/35", Destination:=Range("$A$1"))
.Name = "35"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2,3,4,5,8,9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
What I need to know is how to create a loop so I may change the number in the URL (i.e. 35 to 36, 37, etc) and insert the table results in diferent cells.
Thanks in advance for your help !
I have the following macro which pulls several tables from an internet page.
Verb Macro
'
' Keyboard Shortcut: Ctrl+z
'
Sheets("Sheet5").Select
ActiveCell.Select
Sheets("Sheet5").Select
ActiveCell.Cells.Select
Selection.Delete Shift:=xlUp
ActiveCell.Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.verbs.cat/es/conjugacion/35", Destination:=Range("$A$1"))
.Name = "35"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2,3,4,5,8,9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
What I need to know is how to create a loop so I may change the number in the URL (i.e. 35 to 36, 37, etc) and insert the table results in diferent cells.
Thanks in advance for your help !