+ Reply to Thread
Results 1 to 6 of 6

hide specific columns on multiple sheets with protected cells when workbook is closed

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    GB, WI
    MS-Off Ver
    Excel 2010
    Posts
    41

    hide specific columns on multiple sheets with protected cells when workbook is closed

    I attached an example file.
    I have a commandbutton that allows certain users access to hidden columns. However when the workbook is closed, just in case the users forget to "re-hide" those columns, I would like to have the specified columns automatically hide. There will be a sheet for every month of the year, so the VB code will have to check each sheet to make sure those specified columns are hidden before closing the workbook.
    I'd like to protect each worksheet so that "regular" users can't alter it, but only can input data and insert comments.

    In my example, columns AB:AC are the hidden columns that only management can view with a password. Cells B4:AA34 would be the data entry/insert comments cells. The commandbutton that unhides AB:AC is called "For Sups/Mgrs".

    Please let me know if you have any questions and thanks in advance for your help!

    test.xls

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: hide specific columns on multiple sheets with protected cells when workbook is closed

    Hi jrosko1

    Try this Code in your ThisWorkBook Module
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    GB, WI
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: hide specific columns on multiple sheets with protected cells when workbook is closed

    works perfectly except i also need the "protect Sheet" options to allow users to be able to "Select unlocked cells" AND "Edit Objects". How would i do that?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: hide specific columns on multiple sheets with protected cells when workbook is closed

    Hi jrosko1

    Try this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    GB, WI
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: hide specific columns on multiple sheets with protected cells when workbook is closed

    AWESOME!!! thank you!

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: hide specific columns on multiple sheets with protected cells when workbook is closed

    You're welcome...glad I could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 12-14-2012, 12:12 AM
  2. How to hide specific checkbox-filtered-columns in the entire workbook?
    By chucro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2012, 06:19 AM
  3. Hide/unhidden rows in protected workbook multiple sheets
    By wachinnai in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2012, 02:26 PM
  4. Replies: 9
    Last Post: 09-09-2009, 12:48 PM
  5. [SOLVED] Hide columns in multiple sheets
    By GregR in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2006, 05:15 PM

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