In article ,
John Brock wrote:
[...]
It seemed strange to AutoFilter a range on a single worksheet by
doing something to the entire Application (which might have several
workbooks open), but it worked! Can anyone explain the logic to me?
In any case, the code looks like this:
Dim ws as Microsoft.Office.Interop.Excel.Worksheet
...
ws.Range("MyTableRange").Activate()
ws.Application.Selection.AutoFilter()
Also, does anybody have any idea what the AutoFilter function of
a Range object does (given that it doesn't turn AutoFiltering on)?
Of course...
ws.Range("MyTableRange").Select()
ws.Application.Selection.AutoFilter()
also works, and using Select/Selection looks a bit more harmonious.
What exactly is the difference between Select and Activate anyway?
--
John Brock