+ Reply to Thread
Results 1 to 6 of 6

Locking cells unintentionally

  1. #1
    Registered User
    Join Date
    08-26-2014
    Location
    gent
    MS-Off Ver
    2010
    Posts
    19

    Locking cells unintentionally

    Hello,

    In a protected excel sheet some cells are unlocked to be able to put data in it.
    Apparently these cells can get locked when people are copy/paste data from another workbook to these cells.
    How can I avoid that this happens?

    Thanks!
    Bieke

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Locking cells unintentionally

    I guess this is happening because cells in other workbook are locked

    Try not allowing users to format cells in protected sheet

    protect format cells.jpg
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Locking cells unintentionally

    Quote Originally Posted by kev_ View Post
    I guess this is happening because cells in other workbook are locked

    Try not allowing users to format cells in protected sheet
    This setting applies only to unlocked cells. If a cell is unlocked to start with, this will not prevent formatting that cell.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Locking cells unintentionally

    Quote Originally Posted by Bieke1111 View Post
    Apparently these cells can get locked when people are copy/paste data from another workbook to these cells.
    I have tried this and cannot reproduce it. Steps:

    1. Format a cell to be unlocked
    2. Protect the sheet
    3. Copy a locked cell from another workbook
    4. Paste to the unlocked cell on the protected sheet
    5. The unlocked cell value is updated, and the cell remains locked

    However, if the sheet is not protected, then copying a locked cell and pasting to an unlocked cell will cause the target cell to become locked.

    Can you provide more detail about how these unlocked cells are getting locked?

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Locking cells unintentionally

    @6StringJazzer - yes I was half asleep there - protection only works on locked cells - doh!
    This is the perennial old chestnut about being unable to prevent copy paste format in isolation.

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Locking cells unintentionally

    I too have been unable to re-create this problem - but that does not mean that it cannot happen under certain circumstances or in a different version of Excel

    One option would be a macro to auto-run whenever the values in required "unlocked" cells are amended
    - this procedure unlocks required ranges any time any one of those cells is amended
    Place in sheet module:
    Please Login or Register  to view this content.
    It unlocks all the cells that should be unlocked

    If you do not know the cause of the changes, you could do the same when any of the "unlocked" cells are selected
    Last edited by kev_; 02-22-2018 at 01:23 PM.

+ 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. [SOLVED] Locking Cells without locking worksheet
    By navialivad in forum Excel General
    Replies: 5
    Last Post: 11-24-2014, 12:44 PM
  2. Locking specific cells eventually changing to locking all cells
    By davidingilbert in forum Excel General
    Replies: 1
    Last Post: 03-19-2013, 06:50 PM
  3. VBA code affecting header unintentionally
    By sk8shorty01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2011, 12:39 PM
  4. Help with macro, automatical locking cells when excel is closed but only locking 1 sh
    By snoopy1461 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2011, 11:29 AM
  5. Replies: 1
    Last Post: 07-21-2006, 11:05 AM
  6. SheetChange fire UDF unintentionally
    By Peter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2006, 10:15 AM
  7. unintentionally changing SS
    By lil'bit in forum Excel General
    Replies: 6
    Last Post: 11-12-2005, 03:17 PM

Tags for this Thread

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