Hello all,
I have an excel sheet which is protected and has a VBA code to indicate the date of the cell entry and that cell is one time entry. It is a sheet including tasks of a project to be followed and the employee should only enter the due date he believes he can finish the task and if he finishes the task he choses from the drop down list that the task is completed (cell entry that is related to VBA code to show the date he said the task is done). Now I need help please, if the employee did not choose that the task is completed and the due date is exceeded, I want an email to be sent automatically to me to review with the employee why he did not finish the task. I have around 40 employees where each one of them will be having many projects and the idea is to track who is causing the delay in the project.
The first column includes the task the second column is the drop down list choice (Completed), the third column is the automatic date (due to VBA code) showing what date he said it is complete, the forth column is the due date column which will be entered by the employee and and the fifth column also applies the VBA code to indicate which date he set the due date.
The VBA code that I am using is as follows:
I have an excel sheet which is protected and has a VBA code to indicate the date of the cell entry and that cell is one time entry. It is a sheet including tasks of a project to be followed and the employee should only enter the due date he believes he can finish the task and if he finishes the task he choses from the drop down list that the task is completed (cell entry that is related to VBA code to show the date he said the task is done). Now I need help please, if the employee did not choose that the task is completed and the due date is exceeded, I want an email to be sent automatically to me to review with the employee why he did not finish the task. I have around 40 employees where each one of them will be having many projects and the idea is to track who is causing the delay in the project.
The first column includes the task the second column is the drop down list choice (Completed), the third column is the automatic date (due to VBA code) showing what date he said it is complete, the forth column is the due date column which will be entered by the employee and and the fifth column also applies the VBA code to indicate which date he set the due date.
The VBA code that I am using is as follows:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRg As Range
On Error Resume Next
Set xRg = Intersect(Range("B2:I15"), Target)
If xRg Is Nothing Then Exit Sub
Target.Worksheet.Unprotect Password:="123"
Application.EnableEvents = False
With Target(1, 2)
.Value = Date
.EntireColumn.AutoFit
End With
Application.EnableEvents = True
If xRg.Value <> mStr Then xRg.Locked = True
Target.Worksheet.Protect Password:="123"
End Sub