sitewolf
Active Member
- Joined
- May 4, 2012
- Messages
- 304
I've had this spread I've used for literally years to pull in PGA golf stats- originally created pre-2003 I think.
I've not changed it much, other than save it into new formats along the way, because...it works, so why.
It was working fine as recently as last Sunday, but for this week's tournament it's not. Usually the only VBA tweak I've needed is to occasionally adjust the web tables I'm picking up.
My spread is set to run thru a list of golfers, picking up stats from each's scorecards.
Example link:
https://www.cbssports.com/golf/players/scorecard/399343/2881657/2018/PGA
Currently VBA is set to grab tables 2 and 4, which has been what's been needed for quite awhile, at least all calendar year.
Suddenly there's no data there....and I've not found table numbers thus far that pull in data
Ideas? I'm on Office 365
Snippet from VBA:
For n = 1 To Actives
On Error Resume Next
Range("B2").Select
QueryAddress = ActiveCell
RemoveNames
Range("L8:AK102").ClearContents
CleanUp
With ActiveSheet.QueryTables.Add(Connection:=QueryAddress, Destination:=Range("M8"))
.Name = "LiveStats"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "2,4"
.WebPreFormattedextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
I've not changed it much, other than save it into new formats along the way, because...it works, so why.
It was working fine as recently as last Sunday, but for this week's tournament it's not. Usually the only VBA tweak I've needed is to occasionally adjust the web tables I'm picking up.
My spread is set to run thru a list of golfers, picking up stats from each's scorecards.
Example link:
https://www.cbssports.com/golf/players/scorecard/399343/2881657/2018/PGA
Currently VBA is set to grab tables 2 and 4, which has been what's been needed for quite awhile, at least all calendar year.
Suddenly there's no data there....and I've not found table numbers thus far that pull in data
Ideas? I'm on Office 365
Snippet from VBA:
For n = 1 To Actives
On Error Resume Next
Range("B2").Select
QueryAddress = ActiveCell
RemoveNames
Range("L8:AK102").ClearContents
CleanUp
With ActiveSheet.QueryTables.Add(Connection:=QueryAddress, Destination:=Range("M8"))
.Name = "LiveStats"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "2,4"
.WebPreFormattedextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With