Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have data some of which is locked, but need to be able to filter this
ideally i would like to do this without unlocking the cells is this possible? At the moment I have the following code used to put filter option on or off, but when i put it on it locks the cells so doesnt work how can i get it to only lock if filter is off? Sub Filter() Sheets("samples").Select Cells.Select ActiveSheet.Unprotect Password Range("A3:F3").Select Selection.AutoFilter Sheets("samples").Select Cells.Select ActiveSheet.Protect Password End Sub Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
When you turn protection on by choosing Tools, Protection, Protect Worksheet you can scoll the Allow list to check the option Use AutoFilter. You can recorded it or just add it to your code. If this helps, please click the Yes button. -- Thanks, Shane Devenshire "Miree" wrote: I have data some of which is locked, but need to be able to filter this ideally i would like to do this without unlocking the cells is this possible? At the moment I have the following code used to put filter option on or off, but when i put it on it locks the cells so doesnt work how can i get it to only lock if filter is off? Sub Filter() Sheets("samples").Select Cells.Select ActiveSheet.Unprotect Password Range("A3:F3").Select Selection.AutoFilter Sheets("samples").Select Cells.Select ActiveSheet.Protect Password End Sub Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Now I feel silly it was that simple!
Thanks "ShaneDevenshire" wrote: Hi, When you turn protection on by choosing Tools, Protection, Protect Worksheet you can scoll the Allow list to check the option Use AutoFilter. You can recorded it or just add it to your code. If this helps, please click the Yes button. -- Thanks, Shane Devenshire "Miree" wrote: I have data some of which is locked, but need to be able to filter this ideally i would like to do this without unlocking the cells is this possible? At the moment I have the following code used to put filter option on or off, but when i put it on it locks the cells so doesnt work how can i get it to only lock if filter is off? Sub Filter() Sheets("samples").Select Cells.Select ActiveSheet.Unprotect Password Range("A3:F3").Select Selection.AutoFilter Sheets("samples").Select Cells.Select ActiveSheet.Protect Password End Sub Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locked worksheet & hyperlinks (w/ select locked cells unchecked) | Excel Discussion (Misc queries) | |||
paste locked cells and unlocked cells in protected sheet | Excel Worksheet Functions | |||
Put comments on a locked spreadsheet even though cells not locked | Excel Worksheet Functions | |||
I want the macros to be locked up when cells are locked up. | Excel Programming | |||
Search for Locked Excel files | Excel Programming |