Hi
In a shared workbook, you can have Autofilters working on a protected sheet, provided you set AllowFiltering:=True as one of your protection options, and set this protection on before you share the workbook.
In the shared workbook, users can then set several filters, as required.
To clear and reset the filters, users can manually select each of those filters currently in use and set them back to show ‘All’.
I would like to simplify this and have a macro reset any filters to show all records.
Unfortunately, it doesn’t seem you can do this on a protected sheet in a shared workbook, once the workbook has been saved, and then re-opened.
To have a macro operate on a protected sheet, you need to include UserInterfaceOnly:=True as one of your protection options.
But UserInterfaceOnly:=True is not ‘retained’ in the workbook when you save the workbook, i.e. it is a ‘runtime only’ value.
When you re-open a saved shared workbook, UserInterfaceOnly:=True is ‘lost’, and you will get a ‘can’t do that on a protected sheet’ vba error.
In ‘unshared’ workbooks, you can easily re-implement the UserInterfaceOnly:=True option by turning your protection on again as part of the workbook open event.
But you can’t do this in a shared workbook, since you cannot change ANY protection state once a workbook has been shared.
So my question is:
Is there any way to set Autofilters to show ‘ALL’ records on a protected sheet in a shared workbook, other than to manually select each filter in use????
Has anyone managed to find a way to do this?
And for anyone wondering about shared worbooks, don’t ever use them. (Unless you are using Excel2013 web version).
zeddy