Help with loading markets at midnight

Please post any questions regarding the program here.

Moderator: 2020vision

Help with loading markets at midnight

Postby samhayer » Sun Aug 13, 2023 6:23 am

I need some help please, I would like my exel sheets which are linked to tabs in BA and are working okay to load new markets at midnight . I have been trying to do this for ever and it just wont work for me . I have downloaded Gary's auto loading sheet still not working. Please some tell me what I am doing wrong . I paste this code in sheet 1 this is the market sheet
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
If triggerQuickPickListReload Then
triggerQuickPickListReload = False
Range("Q2").Value = -3.7
triggerFirstMarketSelect = True
Else
If triggerFirstMarketSelect Then
triggerFirstMarketSelect = False
Range("Q2").Value = -5
End If
End If
Application.EnableEvents = True
End If
End Sub

and this in the workbook

Option Explicit

Private Sub Workbook_Open()
Application.OnTime TimeValue("00:00:30"), "loadQuickPickList"
End Sub

and this in Module1

Public triggerQuickPickListReload As Boolean
Public triggerFirstMarketSelect As Boolean

Public Sub loadQuickPickList()
triggerQuickPickListReload = True
Application.OnTime TimeValue("00:00:30"), "loadQuickPickList"
End Sub

and I have tried lots of different ways just cant get it wright can some one please help me thanks
samhayer
 
Posts: 61
Joined: Wed Apr 11, 2012 4:57 am

Re: Help with loading markets at midnight

Postby summit » Tue Aug 15, 2023 7:54 pm

Hi,

I hope this helps. It 100% works for my.

I am not sure what you are coding but I use the fact the cell Q2 does all the work and have a simple macro running which loads the markets at the time specified.

This macro refreshes the market at n11 minutes past 1am and the sets the first market at 12 minutes past 1am.

It then refreshes the market using -6 in cell Q2 every 30 seconds

You can change the times and timings to suit your requirements.
--------------------------------------------------
Dim RunWhen As Date
Dim H As Integer
Dim m As Integer

Sub DogGru() "put the name of your macro here and change accordingly where you see DogGru() below"

Application.ScreenUpdating = False

With Sheet10 "Change to your sheet number"
H = Hour(Now)
m = Minute(Now)
If (H = 1 And m = 11) Then
.Cells(2, 17).Value = -3
ElseIf (H = 1 And m = 12) Then
.Cells(2, 17).Value = -5
Else
.Cells(2, 17).Value = -6
End If
RunWhen = Now + TimeValue("00:00:30")
Application.OnTime RunWhen, "DogGru"
End With

Application.ScreenUpdating = True

End Sub
Sub StopDogGru()
On Error Resume Next
Application.OnTime EarliestTime:=RunWhen, Procedure:="DogGru", Schedule:=False
End Sub



You are welcome :-)

Steve
summit
 
Posts: 59
Joined: Sun May 17, 2009 11:12 am

Re: Help with loading markets at midnight

Postby summit » Tue Aug 15, 2023 7:56 pm

Part two

Remember, you can only change one market. So you can only refresh one market - usually the one that is on the quick pick list.

Get back if any problems.

I am no expert, but I do understand this small macro.

Steve
summit
 
Posts: 59
Joined: Sun May 17, 2009 11:12 am

Re: Help with loading markets at midnight

Postby samhayer » Wed Aug 16, 2023 9:36 am

Good Morning Steve thanks for your reply I will try what yo advise and I will let you know how I get on, thanks very much you have a nice day Sam Hayer
samhayer
 
Posts: 61
Joined: Wed Apr 11, 2012 4:57 am


Return to Help

Who is online

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