In Play Timer

Please post any questions regarding the program here.

Moderator: 2020vision

In Play Timer

Postby mrangry » Tue Apr 12, 2022 10:34 am

I'm trying with little success to get a 5 minute timer running when E2 goes "In Play" and resets when "Not in Play". I've found numerous discussions from previous forum threads and I'm still going round in circles. At best I'm a VBA novice - below is some code from a previous thread which I've tried with no joy. Can anyone shed some light....many thanks. Rob

Code: Select all
Dim timeInPlay As Date
Dim turnedInPlay As Boolean

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Columns.Count = 16 Then
      If Range("E2").Value = "In Play" Then
         If Not turnedInPlay Then
            turnedInPlay = True
            timeInPlay = Now
         End If
      Else
         turnedInPlay = False
      End If
      If turnedInPlay Then Range("T1").Value = DateDiff("s", timeInPlay, Now) Else Range("T1").Value = 0
   End If
End Sub
mrangry
 
Posts: 4
Joined: Mon Sep 04, 2017 2:44 pm

Re: In Play Timer

Postby GaryRussell » Wed Apr 13, 2022 10:35 am

I just tested the code. It works. It displays elapsed seconds since market turned in play in cell T1.

Is it integrating the code into an existing worksheet that is causing you problems?
User avatar
GaryRussell
Site Admin
 
Posts: 9679
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: In Play Timer

Postby mrangry » Wed Apr 13, 2022 1:19 pm

Hi Gary,

All seems fine now after starting with a fresh worksheet not sure what the issue was other than me.

Thanks for the quick reply.

Rob
mrangry
 
Posts: 4
Joined: Mon Sep 04, 2017 2:44 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 28 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.