+ Reply to Thread
Results 1 to 4 of 4

Protected Worksheet w/AutoFilters

  1. #1
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Protected Worksheet w/AutoFilters

    Hi,

    I'm getting a 1004 Run time Error on the attached Workbook. I've added Worksheet protection to each Worksheet. I get an error on the 'WEAPS_QUAL_RPTS' worksheet when I run a "Clear Filter" Macro assigned to the button on the same sheet.

    The Attached file is an .xlsb version to reduce size. The Sheet Protection Password is: Admin

    WEAPS_RPTS_MISC Module Code (the line highlighted in bold is where I get the error in question.)
    Please Login or Register  to view this content.
    ProtectAll_UnProtectAll Module
    Please Login or Register  to view this content.
    Additionally, I was hoping to protect the Cells in the Table be protected from editing but allow for selection (I have conditional formatting to highlight selected row.)

    Thank you in advance for reading my post.
    V/r,
    Jim
    Last edited by sorensjp; 05-24-2019 at 02:13 AM. Reason: Added an Attachment

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: Protected Worksheet w/AutoFilters

    It runs perfectly well here, no errors
    I don't see the BOLD line you mention
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196
    Quote Originally Posted by Keebellah View Post
    It runs perfectly well here, no errors
    I don't see the BOLD line you mention
    Hmm,
    Thank you for looking at the project. The ERROR is on the first section of code. I posted. I may have inadvertently saved the file without the error as I was trying different solutions and combinations.

    I’m not really sure what my best approach is to protecting the individual sheets from inadvertent deletions or changes in general. I’m thinking of just simply removing the VBA code for Sheet Protecting and just use the application itself. I’m still very much learning Excel and not always choosing the best approach.

    V\r,
    Jim

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: Protected Worksheet w/AutoFilters

    Protecting and Unprotecting using VBA is a good option.
    Keep in mind that for many actions you don not need to unprotect if the changes are made using a macro, as the parameter USerInterFaceOnly:=True tells you, this means that the protection only applies to user interaction not macros

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Enabling vba-autofilters on a protected AND shared workbook
    By salsalex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2014, 09:57 PM
  2. Script/Macro to Sort Protected Cells with AutoFilters
    By cabenjam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2012, 12:34 AM
  3. Copy and paste insert rows with protected cells in protected worksheet
    By excel_gecko in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 05:50 PM
  4. Code for Using Autofilters on Protected Workbooks
    By marktaylor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-14-2008, 08:26 AM
  5. Allowing autofilters on protected workbooks
    By Mulllet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-23-2007, 08:03 AM
  6. Autofilters on protected worksheet
    By RJSohn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-06-2006, 11:57 PM
  7. Autofilters on a protected sheet
    By szl1194 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-16-2005, 08:16 AM

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