View Single Post
  #26  
Old 5th February 2012, 02:21 PM
norisk norisk is offline
Member
 
Join Date: Dec 2011
Posts: 334
Default

Thanks Shaun, I made a few adjustments mainly so I can use it on any worksheet & also adjusted the url to -


="http://www.tab.com.au/Racing/Betting/StandardBets/PlaceStandardBet.aspx?State=1&MeetingCode="&E1&"&RacingCode=R&FromDate="&TEXT(A1,"yyyy-mm-dd")&"T00%3a00%3a00&RaceNumber="&D1

Code:
Sub Victab_odds() With activesheet.Range("A3:AZ100").Select Selection.ClearContents activesheet.Range("A1").Select With activesheet.QueryTables.Add(Connection:= _ "URL;" & activesheet.Range("F1"), Destination:=activesheet.Range("$A$3")) .Name = False .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 = xlWebFormattingNone .WebTables = """BetGrid_DGTableOne""" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End With End Sub
Reply With Quote