Hi, I have a macro that runs great in 2010. When column 5 says "Closed" the event macro copies the entire row and pastes it in the "Closed" worksheet, it does the same thing when column 5 says Rejected.
When I sent the workbook to a coworker using 2007, nothing happens, no error no nothing.
Anyone have any ideas?
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 5 Then
If Target = "Rejected" Then
nxtRw = Sheets("Rejected").Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy Destination:=Sheets("Rejected").Range("A" & nxtRw)
Target.EntireRow.Delete shift:=xlUp
ElseIf Target = "Closed" Then
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
Bookmarks