newbie..trouble trying to automate back bet

Questions about integrating Excel and Cymatic, programming, formulae, etc

newbie..trouble trying to automate back bet

Postby Bronson445644 » Thu Jun 06, 2019 8:14 pm

Help needed, new to vba. trying to learn online and pick things up off the forum as i go..but struggling and cutting corners when i can. Am just trying to automate a back bet on the fav when the price hits
2.12, just to start then work my way from there, am using the demo mode obviously. Probably doing everything completely wrong this is the code ive written:

Sub runner1()

If Range("I:8") = 2.12 Then
Range("BA:8, BC:8") = "Back"
Range("BD:8").ClearContents
End If


End Sub

any help would be a god send.
thanks Sam.
Bronson445644
 
Posts: 3
Joined: Mon Jun 03, 2019 6:10 pm

Re: newbie..trouble trying to automate back bet

Postby Bronson445644 » Thu Jun 06, 2019 8:32 pm

ment to add while the race is in-play if thats possible
Bronson445644
 
Posts: 3
Joined: Mon Jun 03, 2019 6:10 pm

Re: newbie..trouble trying to automate back bet

Postby nig299 » Fri Jun 07, 2019 6:56 pm

Hi Sam

I see you have your code in as a module, which means it won't run automatically, it needs to go in as a worksheet event. For reasons I won't go into here, it would be easier to put it in as a worksheet calculate event (see attached).

Open up your vba editor, and from the list on the left, double click the Cymatic sheet and then from the two dropdown boxes on the right, select "worksheet", then the other, "calculate"

On the attached, you'll see a formula in BM8 (which makes the code work everytime it calculates), all this does is mirror the value in the cell you are interested in.

I'm assuming all youl want to do is put the one "BACK" command into BA8 and clear the appropriate status cell, so just those two are referenced.
Finally, as you don't want any other events taking place while this is happening, the code turns these off then back on after.

BE AWARE, as it stands, everytime the status cell is cleared and the odds & stake cells are still populated, another bet will be placed, so it could place dozens of trades in while the price is still what you specify.
You do not have the required permissions to view the files attached to this post.
nig299
 
Posts: 99
Joined: Thu Nov 28, 2013 2:07 am

Re: newbie..trouble trying to automate back bet

Postby Bronson445644 » Fri Jun 07, 2019 7:37 pm

thanks for the reply nig..im learning at a snail pace..
When iv got my head round it il be back with more questions...Many thanks
Bronson445644
 
Posts: 3
Joined: Mon Jun 03, 2019 6:10 pm


Return to Excel - Help / Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron