title: Run-time error '1004':[ Expression.Error] The name 'Source' wasn't recognized. Make sure it's spelled correctly
body: <p>I'm trying to add Power Query code to VBA but I'm getting an error that the "Source" wasn't recognized. </p>
  
  <pre><code>The name 'Source' wasn't recognized. Make sure it's spelled correctly
  </code></pre>
  
  <p>I've been trying to do different spellings or playing with the commas but I'm still getting that error. Would need a second pair of eyes and any suggestions would be extremely helpful. Thanks.</p>
  
  <pre><code>    ActiveSheet.ListObjects("Table1").TableStyle = ""
  ActiveWorkbook.Queries.Add Name:="Table1", Formula:= _
      "let" &amp; Chr(13) &amp; "" &amp; Chr(10) &amp; "    Source = Excel.CurrentWorkbook(){[Name=""Table1""]}[Content]," &amp; Chr(13) &amp; "" &amp; Chr(10) &amp; "    #""Changed Type"" = Table.TransformColumnTypes(Source, {{Table.ColumnNames(Table1){0}, " &amp; _
      "Int64.Type}, { Table.ColumnNames(Table1){1}, type text}, { Table.ColumnNames(Table1){2}, type text}, { Table.ColumnNames(Table1){3}, type text}, { Table.ColumnNames(Table1){4}, type text}, { Table.ColumnNames(Table1){5}, type text}, { Table.ColumnNames(Table1){6}, Int64.Type}, { Table.ColumnNames(Table1){7}, " &amp; _
      "type datetime}, { Table.ColumnNames(Table1){8}, type number}, { Table.ColumnNames(Table1){9}, type number}, { Table.ColumnNames(Table1){10}, type number}, { Table.ColumnNames(Table1){11}, type number}, { Table.ColumnNames(Table1){12}, type any}, { Table.ColumnNames(Table1){13}, type any}, { Table.ColumnNames(Table1){14}, type number}, { Table.ColumnNames(Table1){15}, type number}, { Table.ColumnNames(Table1){16}, type any}, { Table.ColumnNames(Table1){17}, type any}, { Table.ColumnNames(Table1){18}, " &amp; _
      "type any},{ Table.ColumnNames(Table1){19}, type any}, { Table.ColumnNames(Table1){20} , type any}, { Table.ColumnNames(Table1){21}, type any}, { Table.ColumnNames(Table1){22}, type number}, { Table.ColumnNames(Table1){23}, type any}, { Table.ColumnNames(Table1){24}, type number}, { Table.ColumnNames(Table1){25}, type number}, { Table.ColumnNames(Table1){25}, type text}, { Table.ColumnNames(Table1){26}, type text}, { Table.ColumnNames(Table1){27}, type any}, { Table.ColumnNames(Table1){28}, type any}, { Table.ColumnNames(Table1){29}, " &amp; _
      "type any}, { Table.ColumnNames(Table1){30}, type any}, { Table.ColumnNames(Table1){31}, type any}, { Table.ColumnNames(Table1){32}, {Table.ColumnNames(Table1){33} ,type any}, {Table.ColumnNames(Table1){34}, type any}, { Table.ColumnNames(Table1){35}, type any}, { Table.ColumnNames(Table1){36}, type any}, { Table.ColumnNames(Table1){37}, type any}, { Table.ColumnNames(Table1){38}, type any}, { Table.ColumnNames(Table1){39}, type any}, { Table.ColumnNames(Table1){40}, type number}, { Table.ColumnNames(Table1){41}, " &amp; _
      "type number}, { Table.ColumnNames(Table1){42}, type number}, {Table.ColumnNames(Table1){43}, type any}, { Table.ColumnNames(Table1){44}, type any}, { Table.ColumnNames(Table1){45}, type number}, { Table.ColumnNames(Table1){46}, Int64.Type}, { Table.ColumnNames(Table1){47}, type number}, { Table.ColumnNames(Table1){48}, type any}, { Table.ColumnNames(Table1){49}, Int64.Type}, { Table.ColumnNames(Table1){50}, type any}, { Table.ColumnNames(Table1){51}, type number}, { Table.ColumnNames(Table1){52}, type text}, { Table.ColumnNames(Table1){53}, " &amp; _
      "type text}, { Table.ColumnNames(Table1){54}, type number}, { Table.ColumnNames(Table1){55}, type text}, { Table.ColumnNames(Table1){56}, type text}, { Table.ColumnNames(Table1){57}, type any}, { Table.ColumnNames(Table1){58}, type any}, { Table.ColumnNames(Table1){59} , type any}, { Table.ColumnNames(Table1){60}, type any}, { Table.ColumnNames(Table1){61}, type any}, { Table.ColumnNames(Table1){62}, type any}, { Table.ColumnNames(Table1){63}, type any}, { Table.ColumnNames(Table1){64}, type any}, { Table.ColumnNames(Table1){65}, " &amp; _
      "type any},  { Table.ColumnNames(Table1){66}, type number}, { Table.ColumnNames(Table1){67}, type number}, { Table.ColumnNames(Table1){68}, type number}, { Table.ColumnNames(Table1){69}, type number}, { Table.ColumnNames(Table1){70}, type number}, { Table.ColumnNames(Table1){71}, type number}, { Table.ColumnNames(Table1){72}, type number}, { Table.ColumnNames(Table1){73}, type any}, { Table.ColumnNames(Table1){74}, type any}, { Table.ColumnNames(Table1){75}, type number}, { Table.ColumnNames(Table1){76}, type number}, { Table.ColumnNames(Table1){77}, " &amp; _
      "Int64.Type}, { Table.ColumnNames(Table1){78}, type any}, { Table.ColumnNames(Table1){79}, Int64.Type}, { Table.ColumnNames(Table1){80}, type number}, { Table.ColumnNames(Table1){81}, type any}, { Table.ColumnNames(Table1){82}, type any}, { Table.ColumnNames(Table1){83}, type any}, { Table.ColumnNames(Table1){84} , type any}, { Table.ColumnNames(Table1){85}, Int64.Type}, { Table.ColumnNames(Table1){86}, type text}, { Table.ColumnNames(Table1){87}, type any}, { Table.ColumnNames(Table1){88}, type any}, { Table.ColumnNames(Table1){89}, " &amp; _
      "type any}, { Table.ColumnNames(Table1){90}, type number}, { Table.ColumnNames(Table1){91}, type any}, { Table.ColumnNames(Table1){92}, type any}, { Table.ColumnNames(Table1){93}, type any}, { Table.ColumnNames(Table1){94}, type any}, { Table.ColumnNames(Table1){95}, type number}, { Table.ColumnNames(Table1){96}, type any}, { Table.ColumnNames(Table1){97}, type any}, { Table.ColumnNames(Table1){98}, type any}, { Table.ColumnNames(Table1){99}, type any}, { Table.ColumnNames(Table1){100}, type any}, { Table.ColumnNames(Table1){101}, " &amp; _
      "type any}, { Table.ColumnNames(Table1){102}, type any}, { Table.ColumnNames(Table1){103}, type any}, { Table.ColumnNames(Table1){104}, type any}, { Table.ColumnNames(Table1){105}, type any}, { Table.ColumnNames(Table1){106}, type any}, { Table.ColumnNames(Table1){107}, " &amp; _
      "type number},  {Table.ColumnNames(Table1){108}, type any}})," &amp; Chr(13) &amp; "" &amp; Chr(10) &amp; "    #""Unpivoted Other Columns"" = Table.UnpivotOtherColumns(#""Changed Type"", {""DPT "", ""DPT-DESC                 "", ""EMP-CD"", ""FIRST NAME          "", ""LAST NAME           "", ""S.S.N.     "", ""PAY-DT"", ""Pay Date"", ""HR-RATE ""}, ""Attribute"", ""Value"")" &amp; Chr(13) &amp; "" &amp; Chr(10) &amp; "in" &amp; Chr(13) &amp; "" &amp; Chr(10) &amp; "    #""Unpivoted Other Columns"""
  </code></pre>