How to enter and change the connection string and command text of a Querytable in VBA?

I know that for pivot table we can create a variable for the command text and connection then use activeworkbooks.pivotcache.connection/commandtext equal those variables. Is there a way to do the same thing with Querytable?

I tried to do something like activeworkbooks.worksheets(1).querytables(1).connection, but it did not work. Also, I have two different connections for two different querytables within the same workbook.