+ Reply to Thread
Results 1 to 3 of 3

Need vba script to look a worksheet and keep autofilter working

  1. #1
    Registered User
    Join Date
    09-06-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    15

    Need vba script to look a worksheet and keep autofilter working

    Hi all,

    I need your help!
    In Excel, I want to lock specific cells (not all) that I indicated as protected.
    After protecting the worksheet however, only for the preselected cells, I still want to keep the autofilter feature for those columns that contain protected cells. This currently does not work

    Could you show me which code I need to use?

    Thanks,
    Alinda

  2. #2
    Forum Contributor
    Join Date
    06-09-2011
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    194

    Re: Need vba script to look a worksheet and keep autofilter working

    Hi,

    try this:

    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
    , AllowFiltering:=True

    Regards

    Theo
    __________________
    Please consider:

    Thanking those who helped you. Click the scales icon in the upper right corner of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    09-06-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Need vba script to look a worksheet and keep autofilter working

    Many thanks Theo!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1