Results 1 to 10 of 18

Thread: Hide Unhide Picture And Cell Content Using CheckBoxes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    I have just merged both the threads
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    Just typing this on the fly... watch out for any typ0s

    Code:
    Sub Auto_Open()
    Dim wks as worksheet
    for each wks in thisworkbook.worksheets
    wks.Unprotect PassWord:=""' If there's a password, use it within the double quote
    wks.Protect UserInterfaceOnly:=True, Password=""' If there's a password, use it within the double quote
    next wks
    End Sub
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    If you were just wanting to protect that particular sheet, then use

    Code:
    Sub Auto_Open()
    With Worksheets("Particular Sheet Name")
    .Unprotect PassWord:=""' If there's a password, use it within the double quote
    .Protect UserInterfaceOnly:=True, Password:=""' If there's a password, use it within the double quote
    End With
    End Sub
    EDIT: Added a semi-colon to the argument
    Last edited by Excel Fox; 08-03-2013 at 04:19 PM. Reason: Missed to add a semi-colon
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  4. #4
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    I've made a small correction. Check my previous post.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  5. #5
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    The code has to be pasted in a code module, and not in the sheet module or workbook module. Also ensure that the cell you're using is locked.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. VBA To Hide And Unhide Rows
    By paul_pearson in forum Excel Help
    Replies: 10
    Last Post: 05-08-2013, 03:14 AM
  2. Hide/Unhide Columns with Listbox
    By obed_cruz in forum Excel Help
    Replies: 2
    Last Post: 05-28-2011, 07:26 PM
  3. Hide and Unhide Rows and Columns
    By Admin in forum Download Center
    Replies: 0
    Last Post: 05-11-2011, 12:00 AM
  4. Replies: 2
    Last Post: 05-06-2011, 02:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •