I'm trying to use the COM interface to check all bets on a second tab in BA which is just set to load markets at off of .
However all I'm getting returned by ba.getBet(mybetrefs(i)) is nothing.
Does the COM call only cover the market open at that point or is it a global thing?
- Code: Select all
''' Run Through and get Bet Refs , Query this through Com to Get Matched
p1 = 3
i = -1
With ws
Do
i = i + 1
ReDim Preserve mybetrefs(i)
''' Only check future Race Bet Refs Not Previous Ones
If currentTime < Format(.Range("B" & p1), "HH:MM") Then
If currentMarketOffTime > Format(.Range("B" & p1), "HH:MM") Then
mybetrefs(i) = .Range("L" & p1)
ReDim Preserve betMatchedStake(i)
betMatchedStake(i) = ba.getBet(mybetrefs(i))
''' Check For Cancelled And Re-bet
If betMatchedStake(i).betstatus <> "C" Then
''' Get Matched Stake and place on selections Sheet
betMatchedStake(i) = betMatchedStake(i).matchedSize
.Range("I" & p1) = betMatchedStake(i)
Else: goReBet (mybetrefs(i))
End If
End If
Else: i = i - 1
End If
''' Loop through Sheet till All Refs Checked
p1 = p1 + 1
Loop Until .Range("L" & p1) = ""
End With
Any pointers gratefully recieved Duncan