VBA-2 Script
VBA-2 Script
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("WL")
' Unprotect the sheet with the password if it's already protected
ws.Unprotect Password:=strPassword
' Make sure that AutoFilters are enabled before protecting the sheet
If ws.AutoFilterMode = False Then
ws.Range("A1").AutoFilter
End If