Hey everyone,
I have a tracking workbook that tracks open items, when an item becomes closed, the user selects the "Status" Column and chooses closed. When closed is selected, a window pops up with confirmation of the selection, and then it inserts the date in the next column and moves the row to the Closed tab in the workbook and deletes the row from Open tab of the workbook. This all works great. Now I need the code to have another which will essentially do the same thing. The user can either choose either to Close the item or monitor the item, then it will be moved to either the "Closed" tab or the "Monitoring" tab. I used the exact same event code and changed a few things but when "Monitor" is selected, nothing happens. The code is below and an example workbook is attached with the code. The first event works, the second event does nothing. Any help would be great.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 15 Then
If Target = "Closed" Then
Dim nResult As Long
nResult = MsgBox( _
Prompt:="Is this Item Closed?", _
Buttons:=vbYesNo)
If nResult = vbNo Then
Exit Sub
End If
Target.Offset(0, 1).Value = Now
nxtRw = Sheets("Closed").Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy Destination:=Sheets("Closed").Range("A" & nxtRw)
Target.EntireRow.Delete shift:=xlUp
End If
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change1(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 15 Then
If Target = "Monitor" Then
Dim nResult1 As Long
nResult1 = MsgBox( _
Prompt:="Monitor this Item?", _
Buttons:=vbYesNo)
If nResult1 = vbNo Then
Exit Sub
End If
Target.Offset(0, 1).Value = Now
nxtRw = Sheets("Monitoring").Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy Destination:=Sheets("Monitoring").Range("A" & nxtRw)
Target.EntireRow.Delete shift:=xlUp
End If
End If
Application.EnableEvents = True
End Sub
Bookmarks