Checking if the clock in C2 is updating

Please post any questions regarding the program here.

Moderator: 2020vision

Checking if the clock in C2 is updating

Postby Roadhouse » Mon Jun 08, 2015 1:57 am

Hi is there anyway with VBA to check if the clock in C2 is updating I want to check if it pauses for 300 seconds the tell me with a mesage box. Can anyone help
Roadhouse
 
Posts: 98
Joined: Fri Mar 02, 2012 7:01 pm

Re: Checking if the clock in C2 is updating

Postby Captain Sensible » Mon Jun 08, 2015 3:07 pm

What do you mean by pauses? And what are you trying to acheive? Is the program running slow , losing connection etc

I guess your best way is using Application.Ontime so you'd avoid any situations where BA had stopped updating the sheet and therefore any worksheet changes/calcs had stopped. Try messing around with this in a module or call it upon openng the worksheet, basically it'll just call itself and look every 15 seconds to check the value in E2 against the current time. Change that 00:00:15 to whatever you want , I didn't set it to 00:05:00 as it could potentially let thru a 00:09:59 delay

Code: Select all
Sub Check_delay()
If Time() - TimeValue("00:05:00") > Range("E2").Value Then
    MsgBox "Over 300 seconds"
   
   
    End If
     
    Application.OnTime Now + TimeValue("00:00:15"), "Check_delay"
   
End Sub
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: Checking if the clock in C2 is updating

Postby Roadhouse » Mon Jun 08, 2015 4:29 pm

Hi Captain thanks for the reply I am losing connection for some reason so I hoping I can use some code to check if it has lost connection then I can send an email
Roadhouse
 
Posts: 98
Joined: Fri Mar 02, 2012 7:01 pm

Re: Checking if the clock in C2 is updating

Postby Captain Sensible » Mon Jun 08, 2015 4:36 pm

Internet connection or connection to BA, if it's the internet might be best to look at other ways to monitor that as if it goes down not sure how you'd be able to send an email. Is it a VPC or something surely they have their own softwre to monitorup times or you could just ping the IP every so often to check it's up.
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm


Return to Help

Who is online

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