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
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