Clear log betting results

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Clear log betting results

Postby philuk » Thu Apr 08, 2010 8:24 pm

On the moment I have the reload quikpick list that works 100% at midnight every night.

If I would like to clear the bet results sheet , which is sheet2 on my workbook i read that I can use code -7 in VB

Now the question is how , does it work the same as the refresh quickpick :


Code: Select all
Private Sub Workbook_Open()
   If Hour(Now) >= 8 Then
      Application.OnTime TimeValue("00:00:00"), "Clearbettingresults"
   Else
      Application.OnTime TimeValue("08:00:00"), "Clearbettingresults"
   End If
End Sub

and then :

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Columns.Count = 16 Then
        Application.EnableEvents = False
        If triggerClearbettingresults Then
            triggerClearbettingresults = False
            Range("Q2:J500").Value = -7
            End If
        Application.EnableEvents = True
    End If
End Sub

and then :

Public triggerClearbettingresults As Boolean

Public Sub Clearbettingresults()
    triggerClearbettingresults = True
    If Hour(Now) = 0 Then
        Application.OnTime TimeValue("08:00:00"), "loadQuickPickList"
    Else
        Application.OnTime TimeValue("00:00:00"), "loadQuickPickList"
    End If
End Sub



If the code is correct :D must the first one get entered into the workbook and second one into the worksheet ( sheet2 ) and the third code into a new module ( module 2 ) , there is already a module 1 for reloading quickpick list.

Hopefully this is correct , it will make my day as it will be the first one :lol:

Cheers and thanx
philuk
 
Posts: 37
Joined: Tue Mar 02, 2010 12:55 am

Postby philuk » Thu Apr 08, 2010 8:27 pm

Sorry , the last one is like this :

Code: Select all
Public triggerClearbettingresults As Boolean

Public Sub Clearbettingresults()
    triggerClearbettingresults = True
    If Hour(Now) = 0 Then
        Application.OnTime TimeValue("08:00:00"), "Clearbettingresults"
    Else
        Application.OnTime TimeValue("00:00:00"), "Clearbettingresults"
    End If
End Sub


Type mismatch :oops:
philuk
 
Posts: 37
Joined: Tue Mar 02, 2010 12:55 am

Postby philuk » Thu Apr 08, 2010 10:58 pm

Now i am confused. How can I incorporate the clear betting sheet with the load quickpick at midnight every day ?
philuk
 
Posts: 37
Joined: Tue Mar 02, 2010 12:55 am

Postby GaryRussell » Fri Apr 09, 2010 8:12 am

I modified the quick pick reload example for another user.

Here it is http://www.gruss-software.co.uk/Excel/A ... esults.xls

If you think you will be making more than 99 bets in a day change the following statements in module1
Code: Select all
Dim blankCells(99, 6) As String
Sheets("sheet2").Range("A2:F100") = blankCells

For example to change it to clear A2:F1000 it should read as follows.
Code: Select all
Dim blankCells(999, 6) As String
Sheets("sheet2").Range("A2:F1000") = blankCells
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby philuk » Fri Apr 09, 2010 7:40 pm

thanx for thet , Gary , just what i needed :D

Cheers
philuk
 
Posts: 37
Joined: Tue Mar 02, 2010 12:55 am


Return to Discussion

Who is online

Users browsing this forum: No registered users and 48 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.