My objective is to have a button on the form which:
unprotects the form if it is protected
activates the autofilter for all columns if it is not already active
if it is already unprotected activates the autofilter for all columns if it is not already active
This code unfortunately does not operate the autofilter correctly; if the autofilter is already on it removes it
Here is my code: