I try to use Access for placing bets.
i.e. I know the market ID : 107524186 (input in MarketId.Text box)
I can open this market with this code :
- Code: Select all
Private Sub OpenMarketButton_Click()
If ba Is Nothing Then
Set ba = New BettingAssistantCom.ComClass
End If
MarketId.SetFocus
result = ba.openMarket(MarketId.Text, 1)
ba.refreshRate = 1
End Sub
But i would like to have all selections displayed in this form.
I have created text's boxes (selection0 selection1...etc)
This code doesn't work :
- Code: Select all
Private Sub ba_pricesUpdated()
Dim priceItem As Variant
Dim prices As Variant
Dim i As Integer
prices = ba.getPrices
i = 0
For Each priceItem In prices
i = i + 1
Selection(i).SetFocus
Selection(i).Text = priceItem(i).Selection
Next
End Sub
Thanks for your help