Running RDP.Price in VBA

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!

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @dianne.ocumen

    Thank you for reaching out to us.

    I tested it and it doesn't work.

    Please contact the Workspace Excel support team directly via MyAccount regarding how to use the RDP.Price function in VBA.

Answers