+ Reply to Thread
Results 1 to 11 of 11

Lock the column once data is entered

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Lock the column once data is entered

    Hi,

    I need to get Column locked automatically once the data is entered. I have attached the sheet here in that when the stop button clicked end time will come in E5, then only F5 to H5 should get locked automatically, Similarly next time when end time comes in E6 then F6 to H6 get locked along with E5 to H5...Can i get any suggestion/help on this?
    Attached Files Attached Files
    Last edited by anwitha; 08-10-2011 at 12:55 PM.

  2. #2
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Lock the colulmn once the data is entered

    18 Views no reply??

  3. #3
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Lock the colulmn once the data is entered

    Hi anwitha
    First unlock all the cells in the table
    Then replace your 'stop button' macro with below:
    Please Login or Register  to view this content.
    Last edited by barryleajo; 08-06-2011 at 03:32 PM. Reason: Forgot to add password in code

  4. #4
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Lock the column once data is entered

    Dear..barryleaj,

    Its working fine..Thanks lot for your help.

    Cheers.
    Anwitha

  5. #5
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Lock the column once data is entered

    OK anwitha
    Thanks for your feedback.
    If you are satisfied please mark your thread as SOLVED.
    Barry

  6. #6
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Lock the column once data is entered

    One more thing..Also when the user click on stop..if they have not updated those activity transaction should not be end..and should display the pop msg. please update the acitvity..is it possible?

  7. #7
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Lock the column once data is entered

    OK anwitha

    I think the attached does what you now require.
    I have assumed that you require both Activity AND Target status to be updated before calculating the elapsed time.
    Please let me know if it is just Activity and I will modify it.

    I have also implemented some code which:
    .. calculates the elapsed time inside the macro instead of using a worksheet formula
    .. 'draws' the borders around the rows when each one is calculated
    This will free you from having to choose a set number of rows to format in your sheet

    Barry
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Lock the column once data is entered

    Dear barryleajo,

    The requirement which you have mentioned over there as exactly what I need. In the attached sheet when i clicked on stop button without updating activities I am getting the pop up msg but when i am trying to update those activities the cells are protected and not able to update the same...

  9. #9
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Lock the column once data is entered

    anwitha
    I think I must have left some cells locked on the sheet during my testing.
    My apologies for this.

    I have attached another file with some further additions.
    If this happens again you can use a macro to unlock the cells and lock them again on the current/last row.
    Use Ctrl-u to u-nlock the cells and
    Use Ctrl-l to l-ock the cells.
    I have not put these on display because you may not want the user to see/use them.

    I hope that this now meets your requirement.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Lock the column once data is entered

    Dear barryleajo,

    Its Working superbyl!!!!!Thank you so much.

    You have helped me a lot..No need to apologies for that..

    Cheers,
    Anwitha

  11. #11
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Lock the column once data is entered

    OK anwitha
    I'm pleased that it is taking you forward.
    Please now mark your thread as SOLVED.
    Barry

+ 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