Unhide columns on protected worksheet

  • The issue I have is that I need to protect a worksheet to limit the cells that users can input values into however I want to enable them to hide/unhide columns if the wish to see more details.


    Is there a way that you can have a protected worksheet but allow users to hide/unhide columns in Excel2000?

  • yes.


    there is an option when you protect the sheet, to allow the user to "Format Columns"


    This will not allow the user to insert data in the cells, but will allow him to resize columns, and hide/unhide columns.


    To achieve this, you can click on Tools > Protection > Protect Sheet
    Then select "Format Columns"



    Alternatively, this can be done programatically with the following code:

    Code
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingColumns:=True

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!