Clearing Fields

Please post any questions regarding the program here.

Moderator: 2020vision

Clearing Fields

Postby Shaun » Wed Jul 09, 2008 6:16 am

I was wondering what fields are supposed to clear in the trigger section when you manualy select another race, nothing on mine clears i have to clear it manualy.
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby GaryRussell » Wed Jul 09, 2008 8:01 am

They are not meant to clear when you manually select a race. They are only cleared when auto selected from the quick pick list.
User avatar
GaryRussell
Site Admin
 
Posts: 9871
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Shaun » Wed Jul 09, 2008 9:22 am

Is it possible to have them clear, i would think if i am manually selecting a race that i am finished with the last race and would want them to clear
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby MarkRussell » Wed Jul 09, 2008 10:20 am

Hi,

I'm afraid the answer is no.
We have to consider the impact to other users and since this is the way it has been designed this is how users would expect the program to behave.

A solution for you would be to create a button on your sheet which you could then assign a macro to, to clear the cells.

Regards,
Mark
User avatar
MarkRussell
Site Admin
 
Posts: 1793
Joined: Tue Feb 20, 2007 6:38 pm
Location: Birmingham

Postby Ian » Wed Jul 09, 2008 11:54 am

I have a macro on my sheets to clear the fields. Could there not be an option to clear the fields on manual change of market like there is for auto select ? I can think of any reason why I wouldn't want the fields to be cleared, after all they won't relate to the selection on the row, in any case.
Ian
 
Posts: 834
Joined: Sat Nov 19, 2005 8:35 am
Location: Birmingham

Postby GaryRussell » Wed Jul 09, 2008 11:56 am

OK, if it is optional it can't do any harm. I'll add a tick box for the option.
User avatar
GaryRussell
Site Admin
 
Posts: 9871
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Shaun » Wed Jul 09, 2008 1:11 pm

An option would be great, just like the one you have already when you attache the sheet for auto markets.

I do have a macro to clear the sheet right now but a manual one that i forget to press some times, lol.

Thanks you do a great job in setting things up just right.
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby Ian » Wed Jul 09, 2008 2:34 pm

Shaun, you could make the macro run automatically when A1 changes until Gary makes the update.
Ian
 
Posts: 834
Joined: Sat Nov 19, 2005 8:35 am
Location: Birmingham

Postby Shaun » Wed Jul 09, 2008 4:01 pm

I am not good with macros i recorded the one i am using and would'nt know how to set it up.
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby bolpx001 » Wed Jul 09, 2008 5:16 pm

Shaun wrote:Is it possible to have them clear, i would think if i am manually selecting a race that i am finished with the last race and would want them to clear

I think people need to be aware that Gary's software is used and abused in a wide variety of ways. I can see where Shaun is coming from but because of the way I use the software to gather data, it would not be a good option for me to have this alteration made. Even changing the software to make it an optional choice makes me kind of nervous. I have found that in all sorts of program development, the knock-on effect can be lethal, even with the best will in the world options can be inadvertently changed and if any sort of programmed automatic betting is being used the effects can be disastrous. - best regards Paul
bolpx001
 
Posts: 297
Joined: Sat Nov 19, 2005 4:30 am
Location: Dublin, Ireland

Postby Shaun » Thu Jul 10, 2008 1:06 am

If this is a big issue i don't want to upset anyone, i would be happy if some one wrote me the correct macro to clear the cells i needed automaticly when cell a1 was updated.
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby Shaun » Thu Jul 10, 2008 2:22 am

I have this code but unable to make it work

Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = Sheets("Data").Range("A1") Then

Sheets("Data").Range("T5:x29").Select
Selection.ClearContents
Sheets("Control").Range("A1").Select

End If
End Sub


I am a bit confused

My sheet is run from "Control"
all i need it to do is check for changes in A1 on data and if changed clear cells T5:X29 on "data"

Where do i also need to place this code, in sheets or in the moduel
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby Ian » Thu Jul 10, 2008 7:30 am

I use this code which was supplied by another memeber ..

Public sRaceDets As String

Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
Dim iCol As Integer
Dim cell As Object

For Each cell In Target
iRow = cell.Row
iCol = cell.Column

' Check for new race being loaded
If iCol = 1 And iRow = 1 Then
If LCase(cell.Value) <> sRaceDets Then
sRaceDets = LCase(cell.Value)

Application.EnableEvents = False


Sheets("Data").Range("T5:x29").Select
Selection.ClearContents
Sheets("Control").Range("A1").Select



Application.EnableEvents = True
End If
End If
Next cell
End Sub


In your case, the code would need to be attached to your Data worksheet.
Ian
 
Posts: 834
Joined: Sat Nov 19, 2005 8:35 am
Location: Birmingham

Postby Captain Sensible » Thu Jul 10, 2008 3:35 pm

Someone wrote this code in the early days and I've always included it within my sheets to clear the data when switching markets

Private Sub Worksheet_Calculate()
Static MyMarket As Variant
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
If [A1].Value = MyMarket Then
GoTo Xit
Else
MyMarket = [A1].Value
Range("T5:X50").Value = ""
Range("A5:P50").Value = ""
End If
Xit:
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Thu Jul 10, 2008 3:38 pm

Ooops no edit button to add extra stuff.

Just need to press Alt + F11 to bring up the VB editor and paste the code into whichever sheet you want the data to be cleared from
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 46 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.