I have been using the following code to protect all worksheets in a workbook:

Public Sub ProtectAll() 
 Const PWORD As String = "mysecretword" 
 Dim wsSheet As Worksheet 
 For Each wsSheet In Worksheets 
 wsSheet.Protect Password:=PWORD 
 Next wsSheet 
 End Sub
This password protects all sheets without exceptions.

Is there any way to modify the code so that, while it protects all sheets, it universally allows editing of objects, autofilter, and Pivot reports?