title: Using VBA in Excel to sort a table without the table's name
body: <p>My goal is to create macro whose purpose is simply to sort a table in ascending order. I know it seems like a lot of work to save a couple of clicks, but I need it as part of a larger macro, the rest of which already works. Using the record function, I got this.</p>
  
  <pre><code> ActiveWorkbook.Worksheets("Sheet1").ListObjects("Table1").Sort. _
      SortFields.Clear
  ActiveWorkbook.Worksheets("Sheet1").ListObjects("Table1").Sort. _
      SortFields.Add Key:=Range("Table1[[#All],[Column1]]"), SortOn:= _
      xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
  With ActiveWorkbook.Worksheets("Sheet1").ListObjects("Table1").Sort
      .Header = xlYes
      .MatchCase = False
      .Orientation = xlTopToBottom
      .SortMethod = xlPinYin
      .Apply
  End With
  </code></pre>
  
  <p>The above code does work, but I would like to do this without having to reference the table name specifically, because that may change depending on where I'm using it. I wanted to use something like this</p>
  
  <pre><code>Sheets("Sheet1").ListObjects(1).ListColumns(1).Range
  </code></pre>
  
  <p>which as far as I can tell, should point to the same range as
      <code>Table1[[#All],[Column1]]</code>, but VBA doesn't like it. It errors out with "object doesn't support this property or method". I'm fairly confident in using <code>ListObjects(1)</code> because there should only ever be one table on the sheet.</p>
  
  <ol>
  <li>What am I doing wrong?</li>
  <li>Is <code>Sheets("Sheet1").ListObject(1).ListColumns(1).Range</code> equivalent to <code>Table1[[#All],[Column1]]</code>?</li>
  <li>Is there an easier way to sort a table using VBA?</li>
  </ol>
  
  <p>Update: Thanks Chris for the answer; and, I also realized later that I could just rename the table at the start of the script and avoid this whole mess.</p>