Moderator: 2020vision
by eclipse » Fri Jul 25, 2014 4:01 pm 
by osknows » Wed Jul 30, 2014 2:03 pm 
Option Explicit
Dim currentMarket As String
Dim imageImported As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngArray() As Variant
Dim i As Long
Const urlCol As Long = 25 'Column Y
Const picCol As Long = 26 'Column Z
Dim pic As object 'Dim pic As Picture
Dim shape As object 'Dim shape As shape
If Target.Columns.Count <> 16 Then Exit Sub
    Application.EnableEvents = False
    With Target.Parent
    
        rngArray = .Range("A1:BU55").Value2
        
        If rngArray(1, 1) <> currentMarket Then
            currentMarket = rngArray(1, 1)
            imageImported = False
            
            'Delete images
            For Each shape In .Shapes
                If Left(shape.Name, 6) = "Jockey" Then
                     shape.Delete
                End If
            Next shape
        
        End If
        
        If imageImported = False Then
            'Add images
            For i = 5 To Target.Rows.Count
                If InStr(1, rngArray(i, urlCol), "http://", vbTextCompare) > 0 Then
                    Set pic = .Pictures.Insert(rngArray(i, urlCol))
                    pic.ShapeRange.LockAspectRatio = msoFalse
                    pic.Width = .Cells(i, picCol).Width
                    pic.Height = .Cells(i, picCol).Height
                    pic.Top = .Cells(i, picCol).Top
                    pic.Left = .Cells(i, picCol).Left
                    pic.Name = "Jockey" & .Cells(i, picCol).Address
                    imageImported = True
                End If
            Next i
        End If
        
    End With
    Application.EnableEvents = True
    
End SubThe 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.


