What is a good formula or macro to lock a range (ranges) of cells after a certain date hits? And then also protect the worksheet (within the same macro)? You should note that the worksheet is presently protected (just the one sheet from the entire workbook). The password is just hitting enter (for now anyway).

For example, I would like for this to happen exactly 10 days before the end of a month. The cells in question all have a date that equate to the end of a particular month. So a cell that needs to be locked would contain 1/31/14, 2/28/14, 3/31/14, etc. For January, I would like it to lock if it is 1/22/14 or later, February if it's 2/19/14 or later, etc.