+ Reply to Thread
Results 1 to 6 of 6

Locking specific cells/rows through a button

  1. #1
    Registered User
    Join Date
    04-01-2008
    Posts
    63

    Locking specific cells/rows through a button

    Hi,

    I have the following question:

    I want to make a button that locks/unlocks a specifc groups of cells/row.

    For example Cell E6 is a button that locks/unlocks cells B6-D6 or, even better, that locks row 6.

    To be clear, with locking/unlocking I'm mean protecting a cells, thus making it locked for any changes.

    Thank you for your help!

    Regards,

    Edward

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    For locking to work you have to protect the worksheet, in doing so ALL locked cells will be protected so you have to make sure you clear those first, then use some code like:
    Please Login or Register  to view this content.
    to lock and protect the cells and
    Please Login or Register  to view this content.
    to unprotect, since locking is not active unless protected you do not need to unlock unless that is your requirement before protecting again!
    Not all forums are the same - seek and you shall find

  3. #3
    Registered User
    Join Date
    04-01-2008
    Posts
    63

    Thanks but...

    Hmmmzzzz...

    Thanks but... Isn't this a macro to freeze the entire sheet? The problem is my worksheet contains a lot of datapoints (each row is a datapoint) and I want to be able to individually adjust them without risking to accidently adjust another cell.

    My worksheet looks like this:

    B2 - Dropdown menu with 4 choices
    C2 - Dropdown menu with 5 choices
    D2 - Dropdown menu with 7 choices

    Now I want E2 to be a button which I can click to 'freeze' my selection after selecting items in the three dropdown menu's in cells C2-D2. Since cells B3-D3 (until B1000-D1000 or so) also contain such dropdown menu's I'm afraid I might accidently choose the wrong dropdown menu's. Therefore I want a freeze/unfreeze button for each row. (the unfreeze is in case I want to adjust certain rows).

    I hope my question is clear. Thanks for the help!

    Regards,

    Edward

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Firstly if you read my post properly you will notice i said
    Quote Originally Posted by Simon Lloyd
    in doing so ALL locked cells will be protected so you have to make sure you clear those first
    in other words unlock all the cells first before using the code to lock/unlock cells.

    Secondly it would be far more helpful if you could create a dummy workbook with 2 sheets in one with how it is before the action and one with it after, zip it and attach it, that way we can see your structure and try to workout a solution accordingly!

  5. #5
    Registered User
    Join Date
    04-01-2008
    Posts
    63
    Thanks for your reply! Sorry for the confusion.

    I attached my file. In sheet "boekhouding" I want every cell in column H to contain a button that locks that specific row. So I can't accidently change the dropdownmenu for that row.

    Is that possible?

    I also have some sort of strange problem in worksheet "Rekeningen", Range D1-D5 is named "Grootboek" were it should be named uitgaven. I can't change the name, but it doesn't seem to matter in worksheet rekeningen (the drop down menu for uitgaven works normally), what is wrong here?

    Please help me!

    Thanks,
    Regards,

    Edward
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-01-2008
    Posts
    63

    Please help me out...

    Hi,

    Does anyone have an idea how to solve the problem above? I'm kinda stuck right now. Please help me!

    Thanks! Regards,

    Edward

+ 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