» Reset filter before saving a worksheet using VBA in Microsoft Excel
CATEGORY -
VERSION -
Question: Reset all filter criteria in all worksheets when saving a workbook.
Answer:
Insert the following code in This Workbook module.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,Cancel As Boolean)
Dim wks As Worksheet
For Each wks In Worksheets
If wks.FilterMode = True Then
wks.ShowAllData
End If
Next wks
End Sub
Book Store:
Recommended Books:
- Lower Your Taxes - Big Time! : Wealth-Building, Tax Reduction Secrets from an IRS Insider
- Windows XP Annoyances
- How to Use Financial Statements: A Guide to Understanding the Numbers
- Investing for Dummies, Third Edition
- Your First Business Plan: A Simple Question and Answer Format Designed to Help You Write Your Own Plan (3rd Ed)
- Microsoft Access Version 2002 Step by Step
No comments have been submitted.

