I wish to obtain live quotes from a broker and this is the example that they gave me.
It works fine, However I wish to add more quotes(what I added is in bold)
It seems it only returns the first request in both cells.
Dim WithEvents quotes As SterlingLib.STIBook
Dim a As Integer
Private Sub CommandButton1_Click()
Set quotes = New SterlingLib.STIBook
Call quotes.RegisterForTopOfBookMsgs(UCase(Sheet1.Cells(2, 1)), "ARB")
Call quotes.RegisterForTopOfBookMsgs(UCase(Sheet1.Cells(3, 1), "ARB")
End Sub
Private Sub quotes_OnSTIBookUpdate(structSTIBookUpdate As SterlingLib.structSTIBookUpdate)
Sheet1.Cells(2, 2) = structSTIBookUpdate.fPrice
Sheet1.Cells(3, 2) = structSTIBookUpdate.fPrice
End Sub
Bookmarks