Macro to allow auto filter after running password protect

  • Thread starter Thread starter Roady
  • Start date Start date
R

Roady

Hi:

I have a spreadsheet that is protected. In that spreadsheet, I also have
three macros with corresponding buttons to run three different report (plus a
reset button). I need to be able to allow all users to access auto filter
capabilities on the sheet. So, when I password protect it, I check the box
that says allow users to auto-filter. HOWEVER, each of the macros begins and
ends with a password unprotect and password reprotect so that it can complete
some of its functions. So, the problem is when the macro reprotects, it
doesn't allow the auto-filter to be used.

Can you help? Thank you!
 
When the macro protects the sheet there are a number of optional settings
that can be defined. Ensure that this line is included in each protection...

AllowFiltering:=True

So something like
Sheets("Sheet1").Protect AllowFiltering:=True
 
Back
Top