Right now I can use macro recorder to give me the following:
I get there by clicking on a cell in the table, then hitting 'refresh'.Range("A10").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
The problem is that there are several (7) 'stacked' tables on the worksheet (one over another), and I need to make all of them refresh (just the ones on this worksheet though, so 'refreshall' won't work because there are other sheets that I *don't* want to refresh) individually. And using the "Range("A10").Select" method will fail in the future; as tables update and get larger, smaller, the cell references will eventually stop pointing to a cell that's actually in the table desired.
I'm thinking of something like the 'Selection' VBA bit, but that specifies the table *by name* to refresh, without 'pointing' to it first (eg: table name is 'Table_Query_from_SyteLine', or 'Table_Query_from_SyteLine3', etc).
Or perhaps there's a quick command that will be like 'refreshall' but only do the queries on the active worksheet? The 'by name' approach is preferable at this time, however.
Thoughts?
Bookmarks