I need to data mine golf tournament data from a website.
I recorded a macro to do the download, but I need it to loop multiple times
Sub DownloadTournamentData()
'
' DownloadTournamentData Macro
'
'
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.owgr.com/en/Events/EventResult.aspx?eventid=**4504**", Destination _
:=Range("$A$1"))
.Name = "EventResult.aspx?eventid=**4504**"
...
*extraneous code*
...
End With
End Sub
I need a loop so I can download eventids from 4504 to 4604 (I want 100 tournaments so the files don’t get really big) but I can’t figure how to insert the loop number into the bolded code.
Thanks for the help.