Lock / Protect Rows Past Due Date

Mar 5, 2008

I have a workbook list of activities that I am hoping will visualise the scheduling of routine maintenance tasks in my engineering department. The date of the most recent check is entered in row 6 and the interval in row 5. Hence the number 7 denotes a weekly check. The conditional format is such that the reds indicate that a check needs to be carried out. If the check is done on the scheduled day then a "Y" is entered into the square. This will then turn the square green. If "Y" is entered on any other day then the square turns orange to indicate the check is done, if not on time. The red squares do not change colour unless a yes is entered. This is designed to show the history of checks and give us the opportunity to show compliance to routines. What I need to do is lock the rows that have passed the current date, to prevent unscupulous modification. Thus the macro would look down column A and if the date is less than today() would lock the row. I have truncated the file as much as I can. A nice to have would be the facility for an adminstrator to go in (perhaps password protected) to make changes if necessary.

View 3 Replies


ADVERTISEMENT

Lock Past Rows As I Trigger A New One To Appear

Feb 18, 2009

This (unprotects the sheet first, then) unhids rows (starting at row 1500, until it reaches row 4). Now my most current vexation- How do I lock/protect the past rows?
Say a co-worker enters information in row 1500 and walks away. The next co-worker inserts a new row (which would be row 1499) to place data in there, how can I get row 1500 to lock (or become protected) as the new row (which in this case 1499) would become unhidden?
It would be very important that the information in the previous rows remain locked so that nobody can change any client information (unless they had supervisory/administration access).

If it is not possible to protect or lock the whole row, it would also work if I could just lock one of the cells in the previous row.

I am using the following
Sub Row_Unhiding()
'
' Row_Unhiding Macro
' Macro recorded 2/12/2009 by gr8_big_geek
'
' Keyboard Shortcut: Ctrl+i
'
ActiveSheet.Unprotect Password:="secret"
R = 1500
Do Until Rows(R).Hidden = True
R = R - 1
If R < 4 Then
MsgBox "No more rows to add!", vbCritical, "Error"
Exit Sub
End If
Loop
Rows(R).Hidden = False
ActiveSheet.Protect Password:="secret"
End Sub

View 9 Replies View Related

Protect Or Lock Workbook BEFORE Certain Date

Jul 7, 2012

How to protect or lock their spreadsheets after certain date.

My question is how to protect or lock workbooks before certain date?

Example:

I have individual woorkbooks for each week in a calendar year saved in one folder.

Is there any way that I can protect them from either being opened or if opened than not be able to save anything in them until one week before the calendar week they are designed for (or whatever date I wish to set)?

View 3 Replies View Related

Lock And Protect Worksheet After A Date In Cell

Feb 1, 2013

I have a worksheet that is protected with data entry cells unlocked.

1. Unprotect worksheet
2. Lock all cells in the worksheet and then protect.
3. After a date in a cell in the worksheet.

I'm a newbie to vba and at least know vba is the only way. And this need to be automated.

View 1 Replies View Related

VBA Hide Rows - Can't Lock To Protect Formulas

Jun 6, 2012

I have a SS that puls data from another sheet using the following formula

=IF(OR('Site Visit ASSESSMENT'!D9={"PARTIAL COMPLIANCE","NOT COMPLIANT","NOT ASSESSED","ADDITIONAL INFO NEEDED"}),'Site Visit ASSESSMENT'!A9,"")

I also have VB Code in teh sheet as follows to hide rows. If I protect colum A and protect sheet I get an error. How can I protect the sheet and still have the following commnad work?

Private Sub CommandButton1_Click()
'Toggle rows hidden where cells in column D are blank
If ActiveSheet.AutoFilterMode Then

[Code].....

View 6 Replies View Related

How To Lock / Protect Cells In Different Columns Based On Date

Oct 26, 2013

Trying to incorporate the following in a worksheet:

Lock the cells automatically in the columns that are older than 2 days or more

Lock the cells corresponding to today...

View 2 Replies View Related

How To Lock / Protect The Cells In Different Columns Based On Date

Oct 25, 2013

Trying to incorporate the following in a worksheet: Lock the cells automatically in the columns that are older than 2 days or more Lock the cells corresponding to today and yesterday using a command button after entering X Copy the sheet multiple times with the same features

View 14 Replies View Related

Lock And Protect In XL97

Oct 24, 2008

Can I lock cells and protect the sheet and prevent the user to select locked cells in xl97?

View 9 Replies View Related

Lock/Protect Single Module

Aug 21, 2006

I have a workbook(1), contains a worksheet that once filled with user entered parameters, generates data through a VBA module (macro). This module(1) is a proprietary algorithm, and the author has locked the VBA project to protect the module from being tampered with/modified (and rightly so).

I take this data and use it as input in my own algorithms to generate more data. By locking "VBA project" in that workbook(1), I can't see anyway to add my own module(2) to that particular workbook(1). I can create another workbook(2), and write a module(2) there that reads the data from the first workbook(1), but then I'm left with TWO workbooks to do a single task, both have to be opened, and its just not a very elegant way of doing things.

I've contacted the author of the proprietary module(1), and he has no problem modifying the lock protection in the workbook(1) so that only his module(1) is locked, but VBA is not really his forte, and he doesn't know how to do it, or if it is even possible. I've checked many Excel Help facilities, and could not find an answer.

1. Is there any way to lock a SINGLE VBA module within a workbook?

2. Also, is there only ONE VBA project allowed per workbook? If I could add an unprotected VBA project, I could add my own module.

I may not be understanding the entire VB architecture properly, I'm using manuals from 1993, and On-line MS Help is not that "help"ful, so any assistance would be greatly appreciated. Mainly I just want to find out if this is possible or if its not, in which case I'll be forced to work around it in a inelegant fashion. It just seems logical that you should be able to lock just one module.

View 7 Replies View Related

Automatically Lock & Protect Cells

Nov 27, 2006

I have a grid used as a shared diary and I need to automatically protect a cell by changing its colour to red, can this be done using VBA?

View 9 Replies View Related

Lock/Protect Select Cells Only

Apr 17, 2008

In the attached example, I have two fields. In the first (top), I have fields I want the user to be able to enter data (revenue/weight/skids). The information at the bottom is generated by formulas that act on the user-provided data and display the results at the bottom. The key, though, is keeping Excel-ignorant users from inadvertantly destroying the formulas and data in the middle section. I still need to display the results at each step, though, so hiding those middle fields is not an option. How can I lock only some cells within a single spreadsheet like this?

View 2 Replies View Related

Excel 2007 :: Auto Lock Rows 6 Days After Date Passed

Jul 30, 2014

I am new to Excel programming, haven't done any before and not familiar with creating/editing macros. Using Excel 2007.

I would like to automatically lock all the cells in a row if the date in column A in that row is >= 7 days old. Data is entered once a week (some time Sunday - Saturday) and I would like historical data (rows) to be locked so that they can't be edited inadvertently.

If possible could I also highlight the current working week somehow?

I have attached the worksheet : testworksheet.xlsx

View 3 Replies View Related

Protect / Lock Cells After Data Input?

Mar 15, 2013

I have a spreadsheet whee teammates can inut the date in one cell and the exact time in another cell - how do I lock the cell with the time so it can't be changed?

View 1 Replies View Related

Protect/lock Cells After User Input

Jan 9, 2009

Have a worksheet that will be used multiple times. User will enter name and employee number only on the first instance that the worksheet is opened. Would like to protect that info automatically for further usage. Most of the worksheet is protected but some cells need to remain unlocked so the "whole" sheet protection will not work.

How do I protect only specified cells, say F3, G3, H3, I3, after the user enters data thru an input box without changing any other protected cells on the sheet?

View 3 Replies View Related

How To Lock Or Protect Cell Using Data Validation

Jun 6, 2013

1- If I wish to write in the cell I can do it ?
2- When I do not wish to write in the cell I can do it (Its meaning protect the cell.)

View 2 Replies View Related

Auto Lock & Protect Cells After Entry

Feb 28, 2007

How would I go about lock a cell after there is an entry. Once the entry has been made the user could not change the entry. For example if a user enter in cell b2 he could not change the entry, he could change a2, c2, d2. He would also be able to put an other entry in b3, once enter the cell is lock.

View 5 Replies View Related

Protect Or Lock Specific Cells Independently Through Button

Apr 20, 2008

I have the following question: I attached my file. In sheet "boekhouding" I want every cell in column H to contain a button that locks that specific row. So I can't accidently change the dropdownmenu for that row.

I also have some sort of strange problem in worksheet "Rekeningen", Range D1-D5 is named "Grootboek" were it should be named uitgaven. I can't change the name, but it doesn't seem to matter in worksheet rekeningen (the drop down menu for uitgaven works normally), what is wrong here?

View 11 Replies View Related

Automatically Lock / Protect Formula Cell When Entered

Feb 26, 2008

I need to create a macro to where once a cell has had a formula or data inputed that it locks afterwards and cannot be edited without unportecting the sheet or not at all. The problem is I have no idea how to program in VBA. I can get there and select the worksheet but after that I am stumped. How would I enter the macro and what should the macro look like?

View 2 Replies View Related

Lock Cells, Protect Sheet With Password & Time Stamp

Jul 18, 2007

I have a worksheet with employees names and their overtime hours worked that week. I would like to add some code to a button that will prompt for a password. If that password matches a predefiened password then lock a range of cells and place a time stamp next to the button and maybe change the button color of the button to Red. Now if the person with the password wants to change the locked cells, they can click the button again and enter the password and the button will turn green so they can make the changes. I would like the time stamp to be updated every time the cells are locked. Also wanted to have one button for every work week so about four buttons per worksheet. Here is an example of the worksheet. The range of cells I want to lock are the ones in bold.

View 3 Replies View Related

Is Date Past X Weeks From Current Date

Apr 24, 2008

How would I write an if statement that checks to see if the date entered is two weeks past?

View 9 Replies View Related

If Functions And Date :: When Something Is Past Due

Sep 30, 2009

I am trying to create a function that will tell me when something is past due.

I have a excel document for my office's accounts payable, it has a master sheet where all of the companies that we pay are listed, and they are linked so that you can click on the name and it will take you right to the page to see a more detailed breakdown.

I am trying to figure out how to make something on the master page to tell me when something is due, even if it just makes an X when it is past due.

There are about 73 worksheets in this document and each worksheet contains many dates.

Is this even possible for me to do something like this? If not does anyone have any suggestions?

View 10 Replies View Related

Hide Row With Past Date?

Sep 1, 2013

My rows are sorted by date. How do I automatically hide the old ones, but view them when desired?

View 1 Replies View Related

Reminder: Past Due Date

Nov 15, 2006

I want to create an Excel file, which would create alerts/reminders based on dates specified in certain cells. I want to create a database of various events (for ex. Invested in XYZ stock at $10 per share) and put a date in one of the column of each record. I want excel to remind me to take a look at that record after, say, 30 days.

View 3 Replies View Related

Send Email When Date Past

Jul 9, 2008

I have a workbook that records incoming mail and each of these mail need to be responded to. I like to have a macro that can automatically send a standard notification email when certain condition are met.

In this workbook the date of receipt of mail is in Col. D and date of Reply in Col. E.

If Col E is blank or 30 days later than Col. D a standard email is sent to the email account of the person in Col. F. Col. F shows the email address only.

View 14 Replies View Related

Strikethrough Code To Activate When End Date Is Past

Nov 17, 2008

I have this code below, which someone from this forum kindly kindly gave to me for my Worksheet code. What it does is check the value in a dropdown list in column I and if it says "Cancelled" then strikethrough columns A-K of that row.

What I wanted to know is this, in cell N2 has the formula to show todays date. In column D9 onwards is an end date. How can I amend the code below so that it also checks to see if the date in Column D9 onwards is greater than N2 and if so strikethrough columns A-K in that row?

Would it be in the form of an OR statement in the code below?

View 9 Replies View Related

IF Formula - Highlight Cell If Gone Past The Date

Mar 12, 2013

If a cell has not been filled in by its "Completion date" I want it to flag as Urgent in the Status Column. How do I do this?

Ref
Action
Appendix
Status Click
Opening Day
Complete by Date

1
Site Allocation to New Openings Manger

18/03/2013
28/05/2012

View 5 Replies View Related

Color Change Based On Past Due Date

May 9, 2013

We have a assigned date, a due date and a date resolved. what I would like to do is any time the date resolved is past the due date change date resolved background to Red. I was playing around with conditioning formatting but can not seem to get this right....

Col G H I
Date Assigned
Date Due
Date Resolved

5/9/2013
5/16/2013
5/17/2013

View 7 Replies View Related

View Customers Past Due Date With Other Criteria

Apr 6, 2008

I need a macro that will find a row on "Sheet4" that has the word "YES" in column "K" and then varify that there is a balance owed (<$0.00) in column "N" of that same row. If there is a balance owed I need the macro to copy the data from that row into a specific place on "Sheet2" (Column "C" to E10 on the new sheet, D to E11, Q to E12, R to M12, S to T12, G to Y26, H to AF29, M to AF30, N to AF32, and lastly the current date to AC10) then Copy that sheet to a new workbook then rename the copied sheet the the Value of "E10" on that sheet and then clear the data on "Sheet2" so that only the information that was on the sheet before the data transfer is left, If there is no balance owed then it continues down column "K" on it's own to check the next one until it reaches the end of the data in "sheet4" (which is row 2111).

My goal is to be able to use this Macro to sift through a list of customers and to find ones that are past due on their bill (Based of of Column "K" which states that Yes the Bill is past due, and then variefies that it hasn't already been paid by checking the Balance Due Column "N") and then transfers their customer information to an invoice and then moves the invoice to a New workbook (So as to not clutter up my already to large Customer workbook)

This is the code that I have been playing with but i'm getting stuck on how exactlly to do this so i'm sure theres a lot in there that doesn't make any sense.

Sub FindandCopyRows()
Dim Data As Variant
Dim DataFound() As Variant
Dim iValue As Integer
Dim j As Long
Dim i As Integer

View 7 Replies View Related

Increment Cell On Selection And Lock/Protect From Re-Selection

Oct 3, 2006

I tried very hard to design a leave roster for user to mark their leave application. The criteria are as follows:

1. 4 applications per date
2. a region of worksheet (i.e. "A2 to H20) will be defined for users to "click" on the cells (within the defined region) to mark their application.
3. once a cell is clicked (i.e. marked), it cannot be altered.
4. each click will automatically increase the total by 1.

I got the following code to deal with the situation but user can still click on any cell outside the region (in fact I fail to define the region).

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim m
ad = Mid(ActiveCell.Address, 2, 1)
m = Range(ad & 24).Value 'here a formula "CountA(A2,A20)" will be place in the cell (24, c).......................

View 2 Replies View Related

Copy Row Of Cell With Date In The Past And Paste To New Sheet

Jan 16, 2014

creating a VBA that will scan my entire sheet and any cell with a date before todays date, the entire row will be copied and pasted to another sheet. and it should search every cell in sheet 1 and paste all rows with dates in the past. if there is more then one cell in a row with the date in the past, that row will copied only once.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved