Mid() Function Error Msg

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Mid() Function Error Msg

Postby grimesy » Thu Nov 06, 2008 3:52 pm

Hi All,

I am trying to import the RP Tissue Prices into my modified Excel s/s that hooks up to BA

I've been trying to run Gary's macro - but each time I do so, the Mid() Function below is failing to compile.

However, I've been having a few problems with BA assistant over the last few days, which may explain it.

Could someone please, please, please! kindly paste the code for the Mid() Function as a reply?

This will allow me to at least manipulate the RP Tissue Prices in Excel, in the off-chance that BA does go down again.

RP getTissuePrice coding below (with the Mid() Function) highlighted:-

"Option Explicit

Dim tissueURLS() As String
Dim tissuePrices As New Collection
Dim pricesLoaded As Boolean

Public Function getTissuePrice(ByVal horse As String) As Double
Dim i As Integer, p As Integer, key As String
p = InStr(horse, " (")
If p <> 0 Then horse = Mid(horse, 1, p - 1)
getTissuePrice = 0
If Not pricesLoaded Then
getTissueURLS
getTissuePrices
End If
"

Thanks,
Grimesy
grimesy
 
Posts: 53
Joined: Tue Sep 30, 2008 3:58 pm

Postby GaryRussell » Thu Nov 06, 2008 4:24 pm

mid is a built in VBA function, there is no code to provide. What compile error message do you get? If you select 'References' from the 'Tools' menu in the code editor does anything show 'missing reference?'

What problems have you been having with Betting Assistant?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby grimesy » Thu Nov 06, 2008 4:41 pm

Hi Gary - many thanks for getting back to me.

I'm running that macro in work (wanted to try it on a different PC); and yes your solution is correct; the COM Excel Add-In was missing.

Unclicking same produces the right result.

I was nearly 100% sure that the MId() Function was a VBA (vs. a user-defined) sequence of keystrokes; wasn't sure if it was also user-defined (with a very similiar name) to allow for additional arguments in the COM Excel VBA editor.

On the BA "glitches" - was running it off a pretty old PC in recent days, so that was another potential problem. Again, I've tried it here in work this afternoon and am able to get-in OK.

Thanks for getting back to me so quickly.

Grimesy
grimesy
 
Posts: 53
Joined: Tue Sep 30, 2008 3:58 pm


Return to Discussion

Who is online

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