+ Reply to Thread
Results 1 to 10 of 10

Lock the row for editing if Current Date has Passed

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Exclamation Lock the row for editing if Current Date has Passed

    Hi,
    I want to lock the rows for editing after the today's date has passed in excel. I have found a thread for doing the same but it locks columns. Can somebody pls help me do the same with rows.

    http://www.excelforum.com/excel-prog...is-passed.html

    Below code is working perfectly with column lock. I need something similar for rows locking. Pls somebody help

    HTML Code: 
    Attached Files Attached Files
    Last edited by rudswa; 03-28-2015 at 01:41 PM.

  2. #2
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Lock the row if Current Date has Passed

    I have attached a test excel sheet pls look.
    Last edited by rudswa; 03-27-2015 at 07:05 AM.

  3. #3
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Lock the row for editing if Current Date has Passed

    Any help pls...

  4. #4
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Lock the row for editing if Current Date has Passed

    I'm no expert but I have come up with this and it seems to be working for me

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Lock the row for editing if Current Date has Passed

    Thanks for replying arowbot, not working with me, it is not locking the row for editing even though the date is of yesterday in the attached excel, could you pls look
    Attached Files Attached Files
    Last edited by rudswa; 03-27-2015 at 09:04 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Lock the row for editing if Current Date has Passed

    This should do the job...

    Work to be completed (4).xlsm

  7. #7
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Lock the row for editing if Current Date has Passed

    Wow, great. Works like charm

    Thanks a ton for this.


    Quote Originally Posted by ARowbot View Post
    This should do the job...

    Attachment 385853

  8. #8
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Lock the row for editing if Current Date has Passed

    Hi,
    This worked perfectly, but if somebody changes the system date, then the locked cells will become unlocked. Is there any solution for that?... Pls help

  9. #9
    Registered User
    Join Date
    05-27-2013
    Location
    BANGALORE, INDIA
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Lock the row for editing if Current Date has Passed

    Quote Originally Posted by rudswa View Post
    Hi,
    This worked perfectly, but if somebody changes the system date, then the locked cells will become unlocked. Is there any solution for that?... Pls help
    Any help pls for this.........

  10. #10
    Registered User
    Join Date
    09-23-2015
    Location
    Dublin
    MS-Off Ver
    2007
    Posts
    1

    Post Re: Lock the row for editing if Current Date has Passed

    I want to advance this code a bit further.

    I want to change 2 things:

    1) I need to only lock the cells once the current month has passed.
    So for example if the date entered in a cell in column A is in september 2015 i only want the rows to be locked once it moves to october 2015. and continue this code on month by month etc. (So to be clear, i do not mind what day of the month it is, I only care about the month and year)

    2) I want to password protect the locked rows.

    I am having 2 problems. I cannot figure out how to code number 1 above, for rows to lock if cell in column A is not in current month & year.

    And also, my code to password protect does not seem to work properly. When i open the workbook, and click on the review tab, I can still unprotect the sheet without entering the password by clicking on the unprotect button. For some reason I do not get prompted to enter the password even though it is in VBA.
    Unprotect.PNG

    Help please!

    Work to be completed - Help me.xlsm

    See attached file.

+ 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] auto lock rows 6 days after date passed
    By dmmcleod in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2014, 05:25 AM
  2. Lock cells after Today's date passed (VBA excel code)
    By rt1306 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 05-16-2013, 12:06 PM
  3. I need to lock cells after date has passed on time shees.
    By Backsurge in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-20-2013, 01:24 AM
  4. Lock cells after today date passed
    By Abdul Haneef in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2012, 07:17 AM
  5. Lock the sheet once date is passed
    By anwitha in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-11-2011, 01:55 AM

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