I seem to have no trouble getting return data when using XMLGetBasicQuote (see code fragment immediately below):
-----------------------
Function fXMLBasicQuote(strSymbol As String, sXML As String)
eSignal.RequestSymbol strSymbol, False
sXML = eSignal.XMLGetBasicQuote(strSymbol)
End Function
-----------------------
Yet, I get no return data when I use GetBasicQuote, as show in the next code segment:
-----------------------
Function fGetBasicQuote(strSymbol As String, dblBid As Double, dblAsk As Double, dblLast As Double, lBidSize As Long, lAskSize As Long, lLastSize As Long)
Dim quote As IESignal.BasicQuote
eSignal.RequestSymbol strSymbol, False
quote = eSignal.GetBasicQuote(strSymbol)
dblAsk = quote.dAsk
dblBid = quote.dBid
dblLast = quote.DLast
lAskSize = quote.lAskSize
lBidSize = quote.lBidSize
lLastSize = quote.lLastSize
End Function
-----------------------
These were written as functions in VBA for Access, because VBA for Access requires that the
Dim WithEvents eSignal As IESignal.Hooks
statement be used only in a class module.
My main line is in a separate non-class module, which calls the above functions in the following two statements:
Call rtd.fXMLBasicQuote(strCurrentSymbol, strXMLBasicQuote)
Call rtd.fGetBasicQuote(strCurrentSymbol, dblBid, dblAsk, dblLast, lBidSize, lAskSize, lLastSize)
The name of my class module, BTW, is rtdClass
rtd is dimensioned in the main line as:
Dim rtd As New rtdClass
Any ideas as to why the GetBasicQuote doesn't return any values would be appreciated...
Sam
-----------------------
Function fXMLBasicQuote(strSymbol As String, sXML As String)
eSignal.RequestSymbol strSymbol, False
sXML = eSignal.XMLGetBasicQuote(strSymbol)
End Function
-----------------------
Yet, I get no return data when I use GetBasicQuote, as show in the next code segment:
-----------------------
Function fGetBasicQuote(strSymbol As String, dblBid As Double, dblAsk As Double, dblLast As Double, lBidSize As Long, lAskSize As Long, lLastSize As Long)
Dim quote As IESignal.BasicQuote
eSignal.RequestSymbol strSymbol, False
quote = eSignal.GetBasicQuote(strSymbol)
dblAsk = quote.dAsk
dblBid = quote.dBid
dblLast = quote.DLast
lAskSize = quote.lAskSize
lBidSize = quote.lBidSize
lLastSize = quote.lLastSize
End Function
-----------------------
These were written as functions in VBA for Access, because VBA for Access requires that the
Dim WithEvents eSignal As IESignal.Hooks
statement be used only in a class module.
My main line is in a separate non-class module, which calls the above functions in the following two statements:
Call rtd.fXMLBasicQuote(strCurrentSymbol, strXMLBasicQuote)
Call rtd.fGetBasicQuote(strCurrentSymbol, dblBid, dblAsk, dblLast, lBidSize, lAskSize, lLastSize)
The name of my class module, BTW, is rtdClass
rtd is dimensioned in the main line as:
Dim rtd As New rtdClass
Any ideas as to why the GetBasicQuote doesn't return any values would be appreciated...
Sam
Comment