Refreshing a web query table using vba
<p>I have multiple web query tables in an Excel spreadsheet and I can refer to them in vba using QueryTable(1), QueryTable(2), etc.  </p>

<p>I have some vba code that is used to refresh one of these tables, please see below. However, the problem is that every time I create a new web query table, the table's QueryTable number changes (i.e., n keeps changing for QueryTable(n) for a selected table).  Is there a better way to refer to a specific web query table other than referring it as QueryTable(1)?  Thanks.</p>

<pre><code>main_workbook.Worksheets("Input ID").QueryTables(1).Refresh (False)
</code></pre>