0
我有一個RTD服務器,用於向Excel發送數據和從Excel發送數據。我試圖通過在Excel的VBA模塊中構建一些簡單的函數來讓用戶更容易地獲取數據,以便在不知道整個後端的情況下獲取數據。Excel中的模塊函數返回#VALUE
Function parseData(ByVal arrayData As String) As Variant
parseData = Evaluate(arrayData)
End Function
Function getQuote(ByVal ticker As String) As String
getQuote = parseData(Application.RTD("rTech.Quotes", , ticker))
End Function
Function getBidSize(ByVal ticker As String) As String
getBidSize = Application.RTD("rTech.Quotes", , ticker, "bidsize")
End Function
Function getBidPrice(ByVal ticker As String) As String
getBidPrice = Application.RTD("rTech.Quotes", , ticker, "bidprice")
End Function
Function getAskSize(ByVal ticker As String) As String
getAskSize = Application.RTD("rTech.Quotes", , ticker, "asksize")
End Function
Function getAskPrice(ByVal ticker As String) As String
getAskPrice = Application.RTD("rTech.Quotes", , ticker, "askprice")
End Function
Function getLast(ByVal ticker As String) As String
getLast = Application.RTD("rTech.Quotes", , ticker, "last")
End Function
也就是說它基本上,雖然我總是做
= getBidSize( 「XXXX」)叫他們
返回#VALUE的每次嘗試;我猜它是在Application.RTD部分崩潰,但我不是100%肯定的,因爲使用調試時,它只是「停止」,當我跨過RTD調用。