AutoFilter in Excel from Access

M

Mike C

I have button on my form that opens a query, copies it,
and then pastes it into Excel. I then format from cells,
delete some columns, and then freeze panes.

I also want to put the auto filter on but I can't seem to
find the right syntax to get it done. I have tried a few
things and had no success. Any help would be greatly
appreciated, thanks in advance.

xl is excel.application
wb is workbook

1) xl.ActiveWindow.AutoFilter = True
2) xl.AutoFilter = True
3) wb.ActiveSheet.Range("A2").Select.AutoFilter = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top