Excel 2007, hide protect sheets part of ribbon

Posted on 2011-04-22
Last Modified: 2012-05-11
I am trying to protect an excel workbook, but I want users to be able to unprotect and protect certain parts with pre-defined passwords.

I have a form for passwords, but what I looking for is a way to hide the "Protect Sheet" or  "UnProtect Sheet" part of the ribbon.

Any help appreciated
Question by:kieranjcollins
    LVL 30

    Expert Comment

    If you want you can hide the entire Office Ribbon by right clicking on it and selecting Hide. Please see snapshot.

    LVL 12

    Expert Comment


    Author Comment

    I'm going to re-phrase the question

    Can I deactivate the "Unprotect Sheet" or "Protect Sheet" parts of the ribbon so that users can only protect and unprotect through predefined buttons on a sheet.

    Done this in Excel 2003 with the attached code in "ThisWorkbook"

    Private Sub Workbook_Open()
    ' Sub to disable protection toolbar
    Application.CommandBars("Worksheet Menu Bar").Controls("Tools").Controls("Protection").Enabled = False
    Application.OnKey "%{f8}", ""
    End Sub

    Open in new window

    LVL 30

    Accepted Solution

    I am not sure if you can do that in 2007. I believe in 2010 it can be done.


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
    Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

    729 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

    18 Experts available now in Live!

    Get 1:1 Help Now