Excel help - worksheet change event

Please post any questions regarding the program here.

Moderator: 2020vision

Excel help - worksheet change event

Postby alrodopial » Tue Jul 29, 2008 8:33 pm

Hi everyone,
I want at the same time to record odds - bet at more than two markets in the same workbook. So i have lets say at list two sheets with names BF1, BF2 etc and i log BF prices into them (different markets into different sheets -BF1-BF2...-).
In order for the bets to be fired (or for odds to been coppied) i'm using the Workbook_SheetChange event as advised.
Code: Select all
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Target.Columns.Count <> 16 Then Exit Sub
..... rest of code here


The problem is that since markets updade at different time periods the lets say "copy odds macro" for the second sheet - market is fired AND when there is an update in the first sheet-market.
Is there a way that the change event become specified?Like the below:
Code: Select all
If Target.Sheets("BF1").Columns.Count <> 16 Then Exit Sub

So it will be enabled only if there is an update at lets say first sheet-market?
Thanks
Alex
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby Roger » Wed Jul 30, 2008 9:13 am

I'm using two sheets in the same workbook, each sheet is getting different races loaded. But I use an identical copy of the same program in each sheet, using

Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)

End Sub


This way, each sheet deals with its own race. Does that help?
Roger
 
Posts: 140
Joined: Fri Nov 18, 2005 10:45 pm

Postby alrodopial » Wed Jul 30, 2008 3:11 pm

Thanks mate, the
Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Columns.Count <> 16 Then Exit Sub

does the job.
Similar event but refers to specific sheet as it is placed inside the required sheet.
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm


Return to Help

Who is online

Users browsing this forum: Google [Bot], iceman and 51 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.