View Single Post
  #45  
Old 10th October 2012, 05:08 PM
darkshines darkshines is offline
Banned
 
Join Date: Oct 2012
Posts: 3
Default

@Shaun

Excellent excellent work with this. Been a brilliant help. I'm essentially just importing tote odds direct into my punting worksheet, which allows easy comparison, kelly bet calcs etc etc - no more manual data entry.

I've basically got to BASICS PART 2 of your 'course', just needed some help with PART 3. Working fine just want to make it quicker.

Am importing from ozbet (unfortunately name/odds table doest work for some reason so need to grab whole screen), got meeting ID, date in cells A1 and A2 of sheet 'ID'. Have created a list of individual macros for each race of the day, then another macro to run them all depending on how many races in the meeting, so I update all tote prices for meeting at once.

I've shown below the macro I've got for importing Race 1. What I want to do is incorporate the Public Functions (from your 5th Feb post) to speed things up, cos it does take a while.

Are you able to perhaps point out what I need to do to this code to enable the Public Functions to work. My VBA skills aren't quite at that level yet to follow your example.

Code:
Sub Race_1_tote() ' Race_1_tote() Macro With Sheets("tote").QueryTables.Add(Connection:= _ "URL;https://www.ozbet.com.au/UISecure/ToteUI/RaceTote.aspx?fixtureId=" & _ Sheets("ID").Range("a1").Value & _ "&fixtureDate=" & _ Sheets("ID").Range("a2").Value & _ "&contestNumber=" & _ "1", Destination:=Range("tote!$A$10")) .Name = "RaceTote.aspx?fixtureId=" & _ Sheets("ID").Range("a1").Value & _ "&fixtureDate=" & _ Sheets("ID").Range("a2").Value & _ "&contestNumber=" & _ "1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = False .RefreshPeriod = 0 .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub


Thanks in advance!!
Reply With Quote