Option Explicit
Public Sub RetrieveAllFieldsForMoreThanOneSecurity()
Dim IQ As Object
Dim Command As String
Dim RowCount As Integer
Dim ColCount As Integer
Dim Row As Integer
Dim Col As Integer
Dim Value As Variant
Set IQ = CreateObject("MotifXL.IQServer")
Command = "select * from security where SymbolCode in ['1015.MYX[Demo]', '3395.MYX[Demo]']"
IQ.ExecuteIQCommand (Command)
RowCount = IQ.GetRowCount()
ColCount = IQ.GetColumnCount()
For Row = 1 To RowCount
For Col = 1 To ColCount
Cells(Row, Col) = IQ.GetFieldByIndex(Row, Col)
Next Col
Next Row
Set IQ = Nothing
End Sub