+ Reply to Thread
Results 1 to 5 of 5

Need to use auto refresh filter in protected sheet

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    Guangzhou
    MS-Off Ver
    Excel 2013
    Posts
    2

    Talking Need to use auto refresh filter in protected sheet

    Hi guys, I joined just to ask this question, I have a sheet and with a table that is HUGE. I have added a filter that when the user chooses 0 "boxes" the entire row is eliminated. Now, this has a certain level of difficulty as the data is not manually entered onto the table, the data is entered based on ANOTHER CELL elsewhere in the sheet based on a simple =E14. So, next step, if done manually, it would be easy to refresh the table but I wanted to do it automatically so I have used the below code so that when the user adds a value and the 0 changes to something else, the entire row appears on the chart and the values are shown, but when the user enters 0 the row is eliminated. Below is the code for the auto refresh on the autofilter

    Private Sub Worksheet_Calculate()

    If Me.FilterMode = True Then
    With Application
    .EnableEvents = False
    .ScreenUpdating = False
    End With

    With ActiveWorkbook
    .CustomViews.Add ViewName:="Mine", RowColSettings:=True
    Me.AutoFilterMode = False
    .CustomViews("Mine").Show
    .CustomViews("Mine").Delete
    End With


    With Application
    .EnableEvents = True
    .ScreenUpdating = True
    End With
    End If

    End Sub


    The above code works, but only if the sheet is UNPROTECTED. Once, I protect the sheet and try to change the values the whole filter just dies and the whole table is displayed and the filter is eliminated. I just want a way to use what I have with a protected sheet so people cannot modify pictures and formulas. Please let me know if someone can find a way to do this. I have EXCEL 2013. CHECKING THE ALLOW USER TO EDIT FILTERS ON THE PROTECTING SHEET OPTIONS DOES NOT WORK.

  2. #2
    Registered User
    Join Date
    10-27-2012
    Location
    London
    MS-Off Ver
    Excel 2007-2010
    Posts
    59

    Re: Need to use auto refresh filter in protected sheet

    Hi K,

    When protecting the sheet have you allowed users to use the filter, this may be the problem.

    Hope this help.
    Break_Point

  3. #3
    Registered User
    Join Date
    05-23-2013
    Location
    Guangzhou
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Need to use auto refresh filter in protected sheet

    Yea bro. Look at the bottom of my post. I stated I did this.

    CHECKING THE ALLOW USER TO EDIT FILTERS ON THE PROTECTING SHEET OPTIONS DOES NOT WORK.

  4. #4
    Registered User
    Join Date
    10-27-2012
    Location
    London
    MS-Off Ver
    Excel 2007-2010
    Posts
    59

    Re: Need to use auto refresh filter in protected sheet

    The only thing I can suggest is locking the sheet programmatically with enabling the use of filters:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-03-2013
    Location
    Guangzhou
    MS-Off Ver
    Excel 2013
    Posts
    1

    Re: Need to use auto refresh filter in protected sheet

    Quote Originally Posted by Break_Point View Post
    The only thing I can suggest is locking the sheet programmatically with enabling the use of filters:

    Please Login or Register  to view this content.
    I get Run-Time error "1004"
    Method 'AutoFilterMode of object '_Worksheet' failed

    I put them both in the same worksheet SOURCE like this

    Please Login or Register  to view this content.

+ 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