Better late than never. Someone might find this useful. OLEDB uses a PowerQueryConnection.
ActiveWorkbook.Queries(n).Formula or ActiveWorkbook.Queries("queryname").Formula
BTW All the details of the Connection and Query can be conveniently viewed by using Export Connection File on the context menu of the Query in Data > Queries and Connections and opening the exported file in a text editor.