VB help

Posted on 2012-09-19
Last Modified: 2012-09-19
When you protect a sheet you have the option to enable the filter whilst protected.

The trouble I have is that when I use the command buttons on my spreasheet, when it "relocks" the page:-

Sheets("Archive").Protect Sheets("DataSheet").Range("B3").Value

The autofilter option is removed from the 'locked page', is there a way to change the code so that it locks the page but still allows the autofilter.

Or if easier, allow the command buttons to work without unlocking the page.
Question by:Kiwi-123
    LVL 10

    Accepted Solution

    Your workbook is updated (attached).  Now the code allows autofilter while protecting the sheet.

    Author Closing Comment

    Many thanks for yout help with this

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
    This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now