B
bob
i have specified a range as unlocked but when i run a macro to copy a sheet
then protect the destination sheet the autofilter function is disabled. can
i use a filter on an unlocked range in a protected sheet.
' unlock filter range
Range("W12:AL12").Select
Selection.Locked = False
Selection.FormulaHidden = False
' add autofilter
Range("W12:AL12").Select
Selection.AutoFilter
're protect data sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
're-protect test WB
ActiveWorkbook.Protect Structure:=True, Windows:=False
then protect the destination sheet the autofilter function is disabled. can
i use a filter on an unlocked range in a protected sheet.
' unlock filter range
Range("W12:AL12").Select
Selection.Locked = False
Selection.FormulaHidden = False
' add autofilter
Range("W12:AL12").Select
Selection.AutoFilter
're protect data sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
're-protect test WB
ActiveWorkbook.Protect Structure:=True, Windows:=False