Disclaimer: I know just enough Visual Basic to get me in trouble!
Here is my issue: I am trying to download golf tournament scores from the internet to a excel spreadsheet. I have found that World Rankings website is best suited for my task.
To start my process, I recorded the following macro
Sub Macro2()
'
'
'
'
ActiveWorkbook.Worksheets.Add
'
*With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.owgr.com/en/Events/EventResult.aspx?eventid=5454", Destination _
:=Range("$A$1"))*
'
*.Name = "EventResult.aspx?eventid=5454"*
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.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
End Sub
I want to download all the 2014 Tournaments and I know inset a loop
For Event = 5454 to 5653
…
code
…
Next Event
What I need to know is how to concatenate my loop counter EVENT into the lines that I have italicized.