Worksheet_Calculate problem

Please post any questions regarding the program here.

Moderator: 2020vision

Worksheet_Calculate problem

Postby josthkko » Tue May 11, 2010 9:53 pm

I am puzzled with this, but i reckon it has a very simple solution..
When i open a new excel workbook and write the code into the Worksheet_Calculate Sub and connect gruss to that workbook, the code doesn't execute on calculation, and if i click run they execute only once.
I have one older workbook that i have created a couple of months ago and it works fine.
Could someone please explain which settings am I missing?

Thank you!
josthkko
 
Posts: 11
Joined: Thu Feb 25, 2010 5:42 pm

Postby Captain Sensible » Tue May 11, 2010 11:06 pm

Bit hard to second guess without the code, do you have a line within the code turning off Application.EnableEvents= False ? It's possible it's not being turned back on again possibly in some loop

Application.EnableEvents = True.

Does the code refer to a specific worksheet ? Try saving the file and reopening it
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby josthkko » Tue May 11, 2010 11:22 pm

No, i have made this code just for testing purposes:

Private Sub Worksheet_Calculate()
List1.Cells(24, 5) = 1243
End Sub

And when i press run it writes that number in that cell but after i delete it doesn't write it again automatically, just if i press run again, so the code shouldn't be the problem, I would say it's some settings in excel. The sheets that are in examples here on the page work perfectly also.
I'm having problems just if i open a new file, but for the life of me i don't know what am i doing wrong.
josthkko
 
Posts: 11
Joined: Thu Feb 25, 2010 5:42 pm

Postby GaryRussell » Wed May 12, 2010 4:25 am

Have you got any formulas in your spreadsheet to trigger the calculate event? If there aren't any formulas referencing the cells that are being updated by Betting Assistant (or your code) then the event will not fire because nothing is being calculated. For example put =F5 in cell R5 and it should start working.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby josthkko » Wed May 12, 2010 3:05 pm

Yes, that solved it! I just had the VB code but no formulas.

Thank you very much!
josthkko
 
Posts: 11
Joined: Thu Feb 25, 2010 5:42 pm


Return to Help

Who is online

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