Macro Help Pls

Please post any questions regarding the program here.

Moderator: 2020vision

Macro Help Pls

Postby Steve Voltage » Sun Oct 19, 2014 9:05 am

I have recorded the following Macro which seems to work well but when the odds i have in AA5 and AA6 are pasted in R5 and R6 a bet is not placed. Can anyone enlighten me on what i am doing wrong please.

Cheers.

Code: Select all
Sub Macro1()
'
' Macro1 Macro
'

'
    Range("AA5").Select
    Selection.Copy
    Range("R5").Select
    ActiveSheet.Paste:
    Application.Wait (Now + TimeValue("00:00:05"))
    Range("AA6").Select
    Selection.Copy
    Range("R6").Select

End Sub
    ActiveSheet.Paste:
Steve Voltage
 

Re: Macro Help Pls

Postby Steve Voltage » Sun Oct 19, 2014 9:07 am

ahh why can you not edit threads!

Code: Select all

Sub Macro1()
'
' Macro1 Macro
'

'
    Range("AA5").Select
    Selection.Copy
    Range("R5").Select
    ActiveSheet.Paste:
    Application.Wait (Now + TimeValue("00:00:05"))
    Range("AA6").Select
    Selection.Copy
    Range("R6").Select
    ActiveSheet.Paste:

End Sub

Steve Voltage
 

Re: Macro Help Pls

Postby NorthView » Sun Oct 19, 2014 11:45 am

It can be done in one line:

Range("R5:R6").Value = Range("AA5:AA6").Value

Also you should be avoiding use of Select, as it's an unnecessary overhead.
NorthView
 
Posts: 174
Joined: Wed Oct 08, 2008 12:33 pm
Location: London

Re: Macro Help Pls

Postby Steve Voltage » Sun Oct 19, 2014 12:09 pm

That wouldn't work mate as I'm trying copy and paste the cells with a 5 second interval. Your way would copy and paste both cells at once.
Steve Voltage
 

Re: Macro Help Pls

Postby NorthView » Sun Oct 19, 2014 7:19 pm

You should be able to adapt what I posted to suit your needs.
NorthView
 
Posts: 174
Joined: Wed Oct 08, 2008 12:33 pm
Location: London

Re: Macro Help Pls

Postby Steve Voltage » Sun Oct 19, 2014 8:43 pm

NorthView wrote:You should be able to adapt what I posted to suit your needs.


I can use what you suggested but it still does not place a bet when linked to BA. The Macro continues to run and places the odds in (R5) but not bet is placed. It is as the odds are not recognised when using a macro to populate them.
Steve Voltage
 

Re: Macro Help Pls

Postby Captain Sensible » Mon Oct 20, 2014 12:50 pm

Steve Voltage wrote:
NorthView wrote: It is as the odds are not recognised when using a macro to populate them.



Are you getting error messages to confirm that like ERROR_READING_ODDS_OR_STAKE or just guessing? Plenty of us use macros to populate the odds/stakes/triggers with no problem. What errors are you getting, have you tried checking the values sent are numbers?
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: Macro Help Pls

Postby Steve Voltage » Mon Oct 20, 2014 8:44 pm

Not getting errors mate. The Macro poulatse R5 with the odds but nothing happens.
Steve Voltage
 

Re: Macro Help Pls

Postby Captain Sensible » Mon Oct 20, 2014 8:51 pm

Hard to second guess where it's going wrong from the bits you've posted tbh. Gruss has plenty of error trapping to cover cells containing text or incorrect odds are you sure your trigger is valid and is everything entered at once, trigger,stake and odds, is the bet ref cell empty etc?
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: Macro Help Pls

Postby Steve Voltage » Tue Oct 21, 2014 12:09 am

Ok cheers. All i can suggest is if you tries the code i have posted.

Anyway i've abandoned the Macro and am now using simple formulas without an issue. Thanks anyway.
Steve Voltage
 

Re: Macro Help Pls

Postby Captain Sensible » Tue Oct 21, 2014 8:58 am

Good to see you've managed to sort it. The code you posted didn't contain any triggers etc just the R column so wouldn't tell me much tbh.
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: Macro Help Pls

Postby Steve Voltage » Tue Oct 21, 2014 12:38 pm

The trigger and stake are already populated this macro is purely just to populate the odds column. Try it with any trigger or stake. Anyway thanks for showing an interest.
Steve Voltage
 


Return to Help

Who is online

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