79379748

Date: 2025-01-23 03:28:24
Score: 1
Natty:
Report link

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.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Galaxiom