Forums
Welcome to Live View – Take the tour to learn more
Start Tour
There is currently 1 person viewing this thread.
Steve Voltage
14 Aug 15 20:34
Joined:
Date Joined: 23 May 09
| Topic/replies: 6,499 | Blogger: Steve Voltage's blog
I use Betting Assistant(Gruss) linked to a excel spreadsheet and can get by writing my own formulas but when it come to vba code i am cr@p. 

I'm hoping that one of the kind souls on this forum can help me out with a what i believe will be a simple request adding to some existing code.

Basically i use this sample spreadsheet from the Gruss forum to load the quickpicklist at midnight then select the first race:

http://www.gruss-software.co.uk/forum/viewtopic.php?f=8&t=3558

What i would like to add to this spreadsheet is when the first market is selected the second market is then selected 10 seconds later, the 3rd market is then selected 10 seconds later and so on... until the last race has been selected using the -1 trigger in cell Q2.
This can be achieved by using cell D1 which has the start time of the next race. When cell D1 has no time in it(not populated) the -1 trigger stops.

The existing code:

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
            triggerFirstMarketSelect = True
        Else
            If triggerFirstMarketSelect Then
                triggerFirstMarketSelect = False
                Range("Q2").Value = -5
            End If
        End If
        Application.EnableEvents = True
    End If
End Sub


I've tried the Gruss forum and i find the forum like a morgue. Very hard to get anyone to help.

Any Betfairians out there who can sort this please?
Pause Switch to Standard View Gruss Excel help please
Show More
Loading...
Report Aunty Post August 14, 2015 9:21 PM BST
Not sure if it was you who was asking a couple of weeks ago.

My advice is to e-mail Gary & Mark, who are very switched on, and will always help (Gary wrote an entire programme for me).

Cannot ask for more....great people and for only £6.00 a month!
Report Steve Voltage August 14, 2015 9:30 PM BST
I find from their forum they do not want to help individuals. Rather just post a link to a similar thread and hope you work it out so not to get swamped with requests.

Yes it was me the other week. Automated betting takes up all my fecking time!! Cry
Report Smar Tarse August 15, 2015 7:00 AM BST
Can you use the Wait function ? Something like.....

Application.Wait (Now + TimeValue("0:00:10"))' wait 10 seconds from now.
Report Steve Voltage August 15, 2015 11:07 AM BST
Where do i enter that mate?
Report Stow_judge August 15, 2015 11:36 AM BST
http://stackoverflow.com/questions/2319683/vba-macro-on-timer-style-to-run-code-every-set-number-of-seconds-i-e-120-secon

I'd try the delay the line after you get a value
Report Stow_judge August 15, 2015 11:40 AM BST
I'm not so familiar with excel, but with vba code in a module in an access database, you can step through the code with F8
and use the watch window to see variable values. You can also use stop points, so code runs to a point then stops. So you can test sections of code.
You can do things by trial and error in real time and see what happens.
Report Stow_judge August 15, 2015 11:41 AM BST
You normally enter a stop point, then start the code and then go step by step with F8 from that point.
Post Your Reply
<CTRL+Enter> to submit
Please login to post a reply.

Wonder

Instance ID: 13539
www.betfair.com