Consulting

Results 1 to 4 of 4

Thread: Toggle autofilter while sheet is protected

  1. #1
    VBAX Regular
    Joined
    Feb 2010
    Posts
    14
    Location

    Toggle autofilter while sheet is protected

    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 ?

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    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
    Last edited by Kenneth Hobs; 12-17-2014 at 01:01 PM.

  3. #3
    VBAX Regular
    Joined
    Feb 2010
    Posts
    14
    Location
    Thanks for the code.
    I was hoping that there would be a non-coding workaround to it.

  4. #4
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Record a macro. Assign the shortcut key.
    Put the Toggle Filter code in that macro.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •