Hi, we have recently migrated the user to Workspace, and later he found some VBA issues. He wanted to find out if there’s any way to run RDP.Price via VBA and assign the result to a variable?
Previously he could write a function that waited until the output of the function was no longer “Retrieving” i.e. like so:
Function getField(feed As String, ric As String, field As String) As String
Dim data
data = Application.Run("RtGet", feed, ric, field)
Do While VBA.Left(CStr(data), 3) = "Ret" 'ie loop while it is retrieving data
Application.RTD.RefreshData
DoEvents
data = Application.Run("RtGet", feed, ric, field)
Loop
getField = CDbl(data)
End Function
This doesn’t work with just switching to RDP.Price.
To clarify it does work as a cell function, but when calling via VBA it returns Empty. It doesn’t even get to the stage where it returns “Retrieving…” in his loop.
Can you help please? Thank you!