Use RunCommand to close AdvFilter window?

P

Paul Johnson

I have placed the following lines in a sub to give users direct access to
the Advanced Filter/Sort||Load from Query window:

RunCommand acCmdAdvancedFilterSort
RunCommand acCmdLoadFromQuery
RunCommand acCmdApplyFilterSort

Everything works as expected, but I would like the sub to clean up after
itself after the Filter is applied, by closing the Filter/Sort window, now
open behind the active window. I tried looking at the Screen and
Application objects, but I haven't found a way to access the open window.
Any ideas?

TIA

Paul Johnson
 
Top