How do I record all the odds

Please post any questions regarding the program here.

Moderator: 2020vision

Re: How do I record all the odds

Postby MiniBlueDragon » Thu Dec 18, 2014 2:59 am

Ah that's a pain. Wonder why it's so hit and miss? :/

The Worksheet_Calculate isn't the same as Worksheet_Change is it? If they're different I've not used the Worksheet_Calculate before. How do you call it?
MiniBlueDragon
 
Posts: 130
Joined: Tue Jul 05, 2011 1:14 pm
Location: London

Re: How do I record all the odds

Postby Joe68 » Fri Dec 19, 2014 1:40 am

Simple as...
Private Sub Worksheet_Calculate()
<<Stick your code here>>
End Sub

Or - at the top of your VBA editing screen, just under the tool bar, you'll see two pull downs.

Try the left one and select worksheet.

Try the right one, which will now list all of the events associated with the worksheet object. Click on "Calculate".

And that's the thing of it, you're not calling it, you're writing code that runs when an event occurs. There are a number of events that can happen in a worksheet, which you see listed in that pulldown.

As for the difference between the Change and calculate events, they certainly are different. Sounds silly cause a lot of people have never seen Excel not calculate when a cell changes.

The classic is if you have autocalculate turned off (Formulas ribbon, Calculation options in Excel 2010). You can change values till the cows come home but it isn't going to calculate until you tell it to. I used to use that option when I was writing extremely large risk management, portfolio analysis type spreadsheets on some older computers. On those things, if it recalculated every time I changed a cell or formula, it would take 10 times longer in development while I waited for it to recalculate. So, it's sometimes useful that change and calculate are different events.
Joe68
 
Posts: 47
Joined: Tue Jan 22, 2013 9:50 pm

Re: How do I record all the odds

Postby MiniBlueDragon » Fri Dec 19, 2014 7:16 pm

Ah so basically "calculate" does the same as "change" except that "change" does it when a market is selected (the sheet changes) whereas "calculate" does it when the sheet is recalculated (which in this scenario would be directly after it "changes" is autocalculate is enabled.

Gotcha! Thanks. :)
MiniBlueDragon
 
Posts: 130
Joined: Tue Jul 05, 2011 1:14 pm
Location: London

Previous

Return to Help

Who is online

Users browsing this forum: Majestic-12 [Bot] and 47 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.