+ Reply to Thread
Results 1 to 10 of 10

How lock rows and protect cells based on date in first column

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    Edmonton
    MS-Off Ver
    07
    Posts
    5

    How lock rows and protect cells based on date in first column

    I want code to lock rows if Date in first coulumn is <Today(). and protect witha password. Incase if i want to edit any content for the past dates, then i have to able to do by unprotecting the sheet.
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How lock rows and protect cells based on date in first column

    Hello udaybrown7,

    Please see if the thread below, can help you with some ideas of how to solve your issue.

    http://www.excelforum.com/excel-prog...el-code-2.html

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    10-16-2014
    Location
    Edmonton
    MS-Off Ver
    07
    Posts
    5

    Re: How lock rows and protect cells based on date in first column

    this is not helpful, i want a VBA Code

  4. #4
    Forum Contributor
    Join Date
    01-31-2007
    Location
    Aschaffenburg, Germany
    MS-Off Ver
    Office 2013
    Posts
    104

    Re: How lock rows and protect cells based on date in first column

    You could use a Worksheet_Change macro such as
    Please Login or Register  to view this content.
    Of course, in order to be able to unlock your spreadsheet again, you would have to be the one who knows the password.

    Does that help?
    Mike 1001
    _________________________
    Let's keep trying, one day we'll succeed!

  5. #5
    Forum Contributor
    Join Date
    01-31-2007
    Location
    Aschaffenburg, Germany
    MS-Off Ver
    Office 2013
    Posts
    104

    Re: How lock rows and protect cells based on date in first column

    Please Login or Register  to view this content.
    This variant could be used to unlock all cells when you type the spreadsheet password into any unlocked cell.
    That cell woudl be cleared immediately.

  6. #6
    Forum Contributor
    Join Date
    01-31-2007
    Location
    Aschaffenburg, Germany
    MS-Off Ver
    Office 2013
    Posts
    104

    Re: How lock rows and protect cells based on date in first column

    Please Login or Register  to view this content.
    Sorry, I forgot to re-enable events in the previous code.

  7. #7
    Registered User
    Join Date
    10-16-2014
    Location
    Edmonton
    MS-Off Ver
    07
    Posts
    5

    Re: How lock rows and protect cells based on date in first column

    Thanks a lot , code is working..

  8. #8
    Registered User
    Join Date
    10-16-2014
    Location
    Edmonton
    MS-Off Ver
    07
    Posts
    5

    Re: How lock rows and protect cells based on date in first column

    But it is unlcoking hidden and locked formulas in column B and D. This columns has to be locked irrespective of any date

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How lock rows and protect cells based on date in first column

    Then please try the Code like this.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    10-16-2014
    Location
    Edmonton
    MS-Off Ver
    07
    Posts
    5

    Re: How lock rows and protect cells based on date in first column

    Thanks . this code is working

+ 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. Replies: 16
    Last Post: 05-06-2020, 06:12 PM
  2. Lock/Protect Cells based on the color of cell
    By Nisha_NishaDelhi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2014, 07:26 AM
  3. protect and lock rows
    By tkraju in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2014, 11:46 PM
  4. Lock rows based on value in another column
    By pumped in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2010, 11:09 PM
  5. Lock row of cells based on value in one column
    By freud1 in forum Excel General
    Replies: 1
    Last Post: 06-07-2010, 11:46 PM

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