We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Microsoft excel help

Options
2»

Comments

  • lee8040
    lee8040 Posts: 554 Forumite
    The filters red to stay as an option to use so the msg tells them to reset the filters when trying the code to remove the filters it takes them away completely and the next person can't go in and use a filter to narrow down a search. The message will make them aware to reset the filters
  • neilmcl
    neilmcl Posts: 19,460 Forumite
    Part of the Furniture 10,000 Posts Name Dropper
    edited 27 June 2018 at 9:09AM
    So just to clarify, you don't actually want to remove the filters, as the code above will do, you simply want to reset them to show all data but leave the filter on?.
  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    The code above will remove any filter settings but leave the filters themselves (i.e. the little drop-downs) in place.
    As for the message asking a user if they have removed the filters and stopping the save if they say no, that's easy enough to do. However, as mentioned above, why would you do it like that?
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • How about …
    ask = MsgBox("Remove Filter?", vbYesNo)
    If ask = vbYes Then
        For Each ws In ActiveWorkbook.Worksheets
            If ws.AutoFilterMode Then ws.AutoFilter.ShowAllData
        Next
     End If
    
    in both the WorkBook_Open and _BeforeClose subroutines.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.6K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.