Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use autofilter with macro in a protected sheet
Hi,
I have a protected worksheet with the option of Use Autofilter enabled. I have a macro that runs a filter for selected records. I have a second macro (see below) that removes the previous filter. ActiveSheet.Unprotect Selection.AutoFilter Field:=20 ActiveSheet.Protect End Sub How can I again enable the Use Autofilter together with the Active Sheet.Protect command. Thanks Minos |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use autofilter with macro in a protected sheet
Change the last line to callout what you want to allow. The standard
protection protects drawing objects, contents, and scenarios. We'll just add on that you want to allow filtering. ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowFiltering:=True -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Minos" wrote: Hi, I have a protected worksheet with the option of Use Autofilter enabled. I have a macro that runs a filter for selected records. I have a second macro (see below) that removes the previous filter. ActiveSheet.Unprotect Selection.AutoFilter Field:=20 ActiveSheet.Protect End Sub How can I again enable the Use Autofilter together with the Active Sheet.Protect command. Thanks Minos |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using autofilter and sort, while sheet is protected | Excel Discussion (Misc queries) | |||
Autofilter in protected sheet | Excel Worksheet Functions | |||
use macro button to run macro in protected sheet | Excel Discussion (Misc queries) | |||
AutoFilter 2003 Excel Protected Sheet | Excel Discussion (Misc queries) | |||
Applying autofilter to protected sheet | Excel Discussion (Misc queries) |