I am scraping data for an NBA scores and point spread spreadsheet.
Usually I get it from the website on the day itself, which would be
But sometimes I have to go back to a previous day, like
NBA Basketball Scores - DonBest.com (not that the 20210313 in the address signifies the date, 2021/03/13)
The code for the scraping part is
Is there a way for me to paste the web address into another cell, say BG3, then change that 3rd programming line
into something that automatically makes the web address whatever cell BG3 says? So
Thanks!
Usually I get it from the website on the day itself, which would be
NBA Basketball Scores - DonBest.com
View NBA Basketball Scores in real-time from top sportsbooks at DonBest the fastest free live betting odds service available.
legacy.donbest.com
NBA Basketball Scores - DonBest.com (not that the 20210313 in the address signifies the date, 2021/03/13)
The code for the scraping part is
VBA Code:
Range("BK3").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://legacy.donbest.com/nba/scores/", Destination:=Range("$BK$3"))
.Name = "scores_2"
.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
Is there a way for me to paste the web address into another cell, say BG3, then change that 3rd programming line
VBA Code:
"URL;https://legacy.donbest.com/nba/scores/", Destination:=Range("$BK$3"))
VBA Code:
"URL;whatever cell BG3 says", Destination:=Range("$BK$3"))
Thanks!
Last edited by a moderator: