Consulting

Results 1 to 5 of 5

Thread: Protecting Cells With A Password In different Work Sheets With Code?

  1. #1
    VBAX Newbie
    Joined
    Mar 2013
    Posts
    3
    Location

    Protecting Cells With A Password In different Work Sheets With Code?

    Hi All

    I know how to protect cells, and protect them by using Review tab in my ribbon, and protect sheet, but is there a way I can do this in a code form and add a button on the dashboard that will lock these cells and then once these cells need to change to click the button again retype the password and it allows for editing again?

    your help will be well appreciated.

    Thank you

  2. #2
    VBAX Newbie
    Joined
    Mar 2013
    Posts
    3
    Location

  3. #3
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    Have a look at http://www.vbaexpress.com/forum/showthread.php?t=44905. Paul's macro will toggle protection on and off.
    _________________________________________________________________________
    "In theory there is no difference between theory and practice. In practice there is." - Chuck Reid

    Any day you learn something new is a day not wasted.

  4. #4
    VBAX Newbie
    Joined
    Mar 2013
    Posts
    3
    Location
    H Teeroy

    that is what I'm looking for , but know I need to find out how I can put some sort of button on the dashboard, so when I click on it, it asks for the password and once the password is entered, it unprotected the certain cells that had protection on.

    Any ideas?

  5. #5
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    Cells are locked or unlocked, the protection applies to the sheet. When protection is invoked you can only select unlocked cells.

    You can attach the macro call to a button or even a shape. Have a look at http://peltiertech.com/WordPress/how-to-assign-a-macro-to-a-button-or-shape/.
    _________________________________________________________________________
    "In theory there is no difference between theory and practice. In practice there is." - Chuck Reid

    Any day you learn something new is a day not wasted.

Posting Permissions

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