Warning message before saving

Ldg2009

New Member
Joined
Jun 25, 2018
Messages
5
I have a excel spreadsheet with filters when someone saves it with a filter on it messes up the file. Does anyone no what code Ican use so when someone goes to save the file it shows "have all filters been removed? yes goes to save and no cancels the request?

thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Why not just remove the filter before the save if a filter is applied rather than give a message?
 
Last edited:
Upvote 0
You can use a Workbook_BeforeSave event macro. This could be written to remove any filters from the specific worksheet or worksheets so the user doesn't have to be informed. However, macros and events must be enabled or it will not work.
 
Upvote 0
Its not me saving it its a file used by a lot of people who seem to forget the filter by having a warning message they have no exxcuse to save with filters on
 
Upvote 0
Anyone know the best way to write it? I tried it in editor but didn't quite work correctly I must've wrote it wrong
 
Upvote 0
It is still the same question. Why give them a messagebox rather than force an autosave eliminating the filters?
Please explain your thinking.
 
Upvote 0
You can remove the filters totally or leave the filter dropdowns with no filter applied.
 
Upvote 0
The filters need to stay to search for specific information which was why I wanted the warning message
 
Upvote 0

Forum statistics

Threads
1,217,245
Messages
6,135,465
Members
449,937
Latest member
quinnvu24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top