Moderator: 2020vision
by danjuma » Sun Jul 18, 2010 7:50 pm
by milfor » Sun Jul 18, 2010 9:46 pm
by danjuma » Sun Jul 18, 2010 10:33 pm
by osknows » Mon Jul 19, 2010 7:58 pm
by dgs2001 » Tue Jul 20, 2010 8:23 am
If Target.Columns.Count <> 16 Then Exit Sub
by Bumble » Fri Aug 06, 2010 8:16 am
by milfor » Fri Aug 06, 2010 11:15 am
Bumble wrote:Or are we just saying "ignore other changes on this sheet, only fire when 'the change' affects a block of 16 columns"?
by osknows » Fri Aug 06, 2010 12:31 pm
Private Sub worksheet_change(ByVal Target As Range)
MsgBox (Target.Worksheet.Name & vbCrLf & Target.Address)
End Sub
by Bumble » Sat Aug 07, 2010 7:54 am
by danjuma » Tue Aug 10, 2010 9:09 am
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
'Code
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
'Code
End If
End Sub
by dgs2001 » Tue Aug 10, 2010 11:17 am
by danjuma » Tue Aug 10, 2010 11:36 am
dgs2001 wrote:Yes they are the same, both are checking that 16 columns of information was changed in one go.
<> means does not equal
= means equals
Even if all back prices and lay prices stay the same, BA will rewrite them to your spreadsheet in a single block of 16 columns of information.
Duncan
by chemist » Mon Jan 09, 2012 1:07 am
osknows wrote:Put this code in each sheet object of a completely blank Excel workbook, link to BA and you will see exactly which cells update on each refresh
- Code: Select all
Private Sub worksheet_change(ByVal Target As Range)
MsgBox (Target.Worksheet.Name & vbCrLf & Target.Address)
End Sub
by decodagobert » Wed Oct 17, 2012 11:53 pm
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
...
Application.EnableEvents = True
End Sub
by MiniBlueDragon » Wed Apr 03, 2013 1:57 am
osknows wrote:The only thing I can add is....
Private Sub Worksheet_Change(ByVal Target As Range)
...
End Sub
is a recognised EVENT in excel and will only work when placed in each Sheet object in the vba editor; the event triggers when a cell(s) on the specific worksheet changes. The contents & range of the changed cells are passed as a range object named 'Target' which can also be used within the procedure.
Public CurrentMarketID As Long
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
' Get current Market ID
CurrentMarketID = Sheets("Gruss").Range("N3").Value
' Note Current Market ID
Sheets("Race Card").Range("D1").Value = CurrentMarketID
'Check if Market ID changes
If CurrentMarketID <> Me.Cells(3, "N") Then
CurrentMarketID = Me.Cells(3, "N")
' Run GetCard method
GetCard
End If
Application.EnableEvents = True
End Sub
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.