Function GetFromReuters(ByVal RIC As String, Fields() As String)
Dim appReuters As AdxRtList, Done As Boolean, i As Long, tmpArray
As Variant,
Loops As Long
Const MaxLoops = 2500000
Set appReuters = New AdxRtList
appReuters.Source = "IDN" ' set feed name
appReuters.RegisterItems RIC, Fields ' perform registration
appReuters.StartUpdates (RT_MODE_ONUPDATE) ' ask for updates - RUNNING
tmpArray = appReuters.ListFields(RIC, RT_FRV_ALL, RT_FCV_VALUE)
Do
Done = True
For i = 0 To UBound(tmpArray)
If Not IsNumeric(tmpArray(i, 1)) Then
Done = False
Exit For
End If
Next i
If Done Then
appReuters.CloseAllLinks
appReuters.UnregisterAllItems
Exit Do
Else
DoEvents
tmpArray = appReuters.ListFields(RIC, RT_FRV_ALL, RT_FCV_VALUE)
Loops = Loops + 1
If Loops > MaxLoops Then Exit Do
End If
Loop
Set appReuters = Nothing
GetFromReuters = tmpArray
End Function