Protected sheet and Autofilter?

  • Thread starter Thread starter harpscardiff
  • Start date Start date
H

harpscardiff

Hi,

I have preset filters recorded for different status, so at a click of a
button anybody can view pending cases which are at a very high status.
But the buttons do not function when I protect the sheet, even though I
have selected the Enable AutoFilter box.

Is there any code I can enter to unprotect the sheet then protect the
sheet?

Thanks
 
Hi

Create a button on your sheet and apply this code (you will have to insert
your autofilter code)

You will also change sheet1 to the name of the sheet and also password to
your password


private sub commandbutton1_click()

sheets("sheet1").Unprotect = "password"

Autofilter here

sheets("sheet1").Protect = "password"

end sub
 
Hi harpscardiff

First activate Autofilter and then protect your sheet with the filter option checked
 
I understand what you guys are saying - but I have 4 different filters.

1 - turns filters on and off
2 - Shows pending records
3 - shows TBA records
4 - shows very high/high pending records.

I can't turn them all on, then protect.....do I have to amend the code
if so how?

Thank
 
Back
Top