+ Reply to Thread
Results 1 to 16 of 16

Auto locking cells

  1. #1
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Auto locking cells

    I have created a shared workbook to update certain entries by my colleagues. I have noticed that some of the entries were deleted after some time. I want to know if I can share the work with the following feature:-

    As soon as somebody enters data to a cell, it should be automatically locked and should not allow anyone to delete or edit the cell.

    How do I do it? Please help me. Thanks in advance.
    Last edited by mifzal.mufthi; 04-29-2013 at 12:56 PM.

  2. #2
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Help me please

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Auto locking cells

    You can't use sheet protection when the file is in shared mode


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Quote Originally Posted by :) Sixthsense :) View Post
    You can't use sheet protection when the file is in shared mode
    Thanks but I don't think you have understood the question. I know that protection cannot be enabled while on sharing mode. I know how to enable protection too. What my question is, how do I protect cells as soon as I enter a data? The purpose of doing that is to prevent deleting or modifying data. Once a data is entered, it should automatically lock the cell. How do I do that?

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Auto locking cells

    Again, protecting the cell content can't be done without using the sheet protection

  6. #6
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Quote Originally Posted by :) Sixthsense :) View Post
    Again, protecting the cell content can't be done without using the sheet protection
    READ MY ENGLISH. I know how to protect worksheet. I am expecting a solution to my question

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Auto locking cells

    Quote Originally Posted by mifzal.mufthi View Post
    READ MY ENGLISH. I know how to protect worksheet. I am expecting a solution to my question
    IS THIS IN ENGLISH??? And as you expect a solution to your question and we MUST(we had to.) give a solution...

    http://chandoo.org/forums/topic/lock...-entry-in-cell
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  8. #8
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Quote Originally Posted by Fotis1991 View Post
    IS THIS IN ENGLISH??? And as you expect a solution to your question and we MUST(we had to.) give a solution...

    http://chandoo.org/forums/topic/lock...-entry-in-cell
    I know 0 about coding. So, can you please explain me the step by step process?

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Auto locking cells

    Quote Originally Posted by mifzal.mufthi View Post
    READ MY ENGLISH. I know how to protect worksheet. I am expecting a solution to my question
    if you formulate your request, more politely, be sure that you'll find your solution..

  10. #10
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Quote Originally Posted by Fotis1991 View Post
    if you formulate your request, more politely, be sure that you'll find your solution..
    Yes I understand. I've asked the question politely and the person replied didn't seem to have understood the question. I kept repeating. You'll understand if you read the thread. Anyways, will you be able to find a solution for me please?

  11. #11
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Auto locking cells

    perhaps you could read your own statement
    I know that protection cannot be enabled while on sharing mode.
    but then
    how do I protect cells as soon as I enter a data?
    the answer is clear as you have already outlined-do not use sharing mode. if you must use sharing mode you cannot change the protection of cells
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  12. #12
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Quote Originally Posted by JosephP View Post
    perhaps you could read your own statement

    but then


    the answer is clear as you have already outlined-do not use sharing mode. if you must use sharing mode you cannot change the protection of cells
    I have removed the sharing. Now, how do I accomplish my task?

  13. #13
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Auto locking cells

    right click the worksheet tab choose view code then paste in this code
    Please Login or Register  to view this content.
    finally I suggest you read your posts again and try and see how they appear to others-it may encourage you to adopt a different tone with the people you want to help you ;-)

  14. #14
    Spammer
    Join Date
    01-09-2011
    Location
    Colombo
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Auto locking cells

    Quote Originally Posted by JosephP View Post
    right click the worksheet tab choose view code then paste in this code
    Please Login or Register  to view this content.
    finally I suggest you read your posts again and try and see how they appear to others-it may encourage you to adopt a different tone with the people you want to help you ;-)
    Thanks buddy. It worked only once. I mean, only 1 entry is allowed and it locks automatically. I should be able to enter so many entries and as we enter entries, they should be locked. Thanks for your effort again. Please refer the attached
    Attached Files Attached Files

  15. #15
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Auto locking cells

    you need to unlock all the cells you want the user to be able to change before you start-Locked is the default setting

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Auto locking cells

    An alternative approach without using sheet protection. It *may* work for you and may even work in a shared workbook ... but no guarantees.

    It uses Worksheet_SelectionChange to monitor the cells. Once data has been entered, you cannot select the cell(s) again. It "homes" to cell A1 if a completed cell is selected. You could limit the range that is monitored and you could pick a different cell to home to. However, you do need to move away from the selected cell.

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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