PDA

View Full Version : Toggle autofilter while sheet is protected



raytrace
12-12-2014, 11:21 PM
I am trying to use the keyboard shortcut to toggle the auto-filter (Shift + Ctrl + L) but it only works when the sheet is unprotected.

Can it be done while the sheet remains protected ?

Kenneth Hobs
12-17-2014, 10:52 AM
If you use a macro method and you know the password as the programmer, sure.

e.g.

Sub ToogleFilter()
With Sheet1
.Protect "ken", userInterfaceOnly:=True, DrawingObjects:=False
.Range("A1").AutoFilter
End With
End Sub

raytrace
12-18-2014, 12:03 AM
Thanks for the code.
I was hoping that there would be a non-coding workaround to it.

SamT
12-18-2014, 04:57 AM
Record a macro. Assign the shortcut key.
Put the Toggle Filter code in that macro.