+ Reply to Thread
Results 1 to 9 of 9

Unprotect Cell on result of given cell

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Unprotect Cell on result of given cell

    Not sure if this should be in the programming forum o the general so i'm going to guess at programming.

    On the attached example i have all cells except those needed to be entered into password protected. However, when i choose 'league' from the drop-down in B2 i want cell E5 to become unprotected without having to input the password.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Unprotect Cell on result of given cell

    You could use the worksheet_selectionchange event
    Please Login or Register  to view this content.
    You would also need code to re=lock the cell - see this similar post
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Unprotect Cell on result of given cell

    Sorry i've added the code above but it still is not unprotecting cell E5. I have attached the sheet again with the code. Am i doing something wrong?

    I meant to say in the original post, the password to protect/unprotect the sheet is 'Password', if this is needed.
    Attached Files Attached Files
    Last edited by adam2308; 05-06-2009 at 07:22 AM.

  4. #4
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Unprotect Cell on result of given cell

    Try the attached file.
    modytrane
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Unprotect Cell on result of given cell

    it seemed right when i first opened the file as i was able to edit E5, when i changed B2 to Tournament that was fine as i could no longer edit E5 (which is correct) but when i changed B2 back to League i could not edit E5 anymore.

    Thanks for your help so far.

  6. #6
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Unprotect Cell on result of given cell

    it seems to work for me.
    try again. I've attached the file again.
    modytrane
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Unprotect Cell on result of given cell

    This works when i choose E5 with the mouse but if i tab through the cells it skips E5 when league is chosen but goes to the cell when tournament is chosen. Although, for some reason it tabs correctly at first but if you tab through the cells again it does as i say above.

  8. #8
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Unprotect Cell on result of given cell

    You are correct about excel behavior depending on how you select the cell.
    The macro written by royUK needed to be installed in Worksheet and its a Wroksheet_SelectionChange Event macro.
    I have had similar expereinces with these types of event macros.

    I don't know enough about excel to explain this, but one of the experts here will be able to answer this.
    I am interested in the answer as well.

    modytrane

  9. #9
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Unprotect Cell on result of given cell

    thanks modytrane. Hopefully one of the experts will be able to help us solve this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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