title: How to edit the source of a power query using VBA?
body: <p>I am trying to edit the source of one of my queries using VBA. This is what I have so far:</p>
  
  <pre><code> Dim mFormula As String
  
   mFormula = _
  
   "let Source = Excel.Workbook(File.Contents(wbname), null, true) in Source"
  
   query1 = ActiveWorkbook.Queries.Add("LATEST", mFormula)
  </code></pre>
  
  <p>I set <code>wbname</code> previously in my code.  "LATEST" is already added, instead of delete it and read it, I would just like to change the source. Is this possible?</p>