I want to place a bet using com's "placeBet" function and get the result later from a raised betPlaced event
so in a MODULE I have:
- Code: Select all
Public ba As BettingAssistantCom.ComClass
Public Sub placeMyBet()
ref = ba.placeBet(selecId, betType, odds, stake, False, token)
End Sub
where do I place the
"Dim WithEvents ba As BettingAssistantCom.ComClass"
or is it "Public WithEvents ba As BettingAssistantCom.ComClass"
or something else with "WithEvents"
I tried in "ThisWorkbook" but no event raised
I declare the ba once as public, on the top of one module