I need to re-apply filter when any data on the worksheet changes. Excel requires to do this manually. How I can re-apply filter programmatically?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think the easiest way is to remove auto-filter and re-apply it thanks to this kind of VBA Code (you can probably adapt it to VSTO?):
Code found on MSDN
[EDIT] You can also find some valuable information in this thread: Reordering Excel Table Columns with Filters Intact (look at the comments)