Notification when odds reach certain level?

Please post any questions regarding the program here.

Moderator: 2020vision

Notification when odds reach certain level?

Postby Qii » Tue Mar 08, 2011 11:27 pm

Hi. I'm wondering if it would be possible to create an excel sheet where i could load certain markets for it to monitor, and when a certain price is hit it would notify me.
I'm not looking for it to place any bets, just let me know when the odds have been reached (by playing a sound clip maybe?)
I new to using excel with gruss, so i would just like to know if it is possible. And if it is I would be grateful if someone could point me in the right direction.
Thanks in advance :D
Qii
 
Posts: 2
Joined: Tue Mar 08, 2011 6:59 pm

Postby osknows » Tue Mar 08, 2011 11:57 pm

Depends on what notification you require but should be relatively straight forward...


To monitor a change in a worksheet normally this is used in the SHEET object in VBA editor...

Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)

   If Target.Columns.Count = 16 Then
    Application.EnableEvents = False
    'your code here

    Application.EnableEvents = True
   End If

End Sub


To check if say F5 (Current Back odds) is less than 10 and display a message. However, a message stops the code until 'OK' is clicked

Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)

   If Target.Columns.Count = 16 Then
    Application.EnableEvents = False
    with ThisWorkbook.Sheets(Target.Worksheet.Name)

    if .range("F5").value <10 then msgbox("Less than 10")
    End with

    Application.EnableEvents = True
   End If

End Sub



If you want to play say the Chord.wav file in C:\Windows\Media\

you could use

Code: Select all
Private Declare PtrSafe Function sndPlaySound32 _
    Lib "winmm.dll" _
    Alias "sndPlaySoundA" ( _
        ByVal lpszSoundName As String, _
        ByVal uFlags As Long) As Long

Private Sub Worksheet_Change(ByVal Target As Range)

   If Target.Columns.Count = 16 Then
    Application.EnableEvents = False
    With ThisWorkbook.Sheets(Target.Worksheet.Name)

    If .Range("F5").Value < 10 Then sndPlaySound32 "C:\Windows\Media\Chord.wav", 0&
    End With

    Application.EnableEvents = True
   End If
End Sub
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby Qii » Fri Mar 11, 2011 6:28 pm

Brilliant thanks mate :D
Qii
 
Posts: 2
Joined: Tue Mar 08, 2011 6:59 pm


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 53 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.