Using the COM interface
This is a condensed version of the chapter with the same heading in the API manual “Quantlab API 3.1.xxxx.pdf”.
All Qlang functions, including your own functions in library files and dll:s, can be exposed via COM to Visual Basic. The function definitions are generated by producing a tlb-file. To produce such a file from Quantlab, proceed as follows.
Save your library files in the path that you set in Tools Options, and restart Quantlab.
Choose Tools, Advanced, Generate Type Library.
To access the Qlang functions from VBA in MS Excel, start VBA and verify under Tools, References, that the Quantlab COM Library is in the list and is active. If it does not appear in the list you have to browse to the COM library file qlab31.tlb in your Quantlab folder.
In the object browser in VBA all Quantlab functions appear in the ql object with their function definitions. To get more help on each function, use the function browser in Quantlab.
See the manual for the Quantlab API for more information about the COM interface.