hkbhansali
New Member
i have a vb code as under
I want run this macro when i click on command button
please help
Code:
Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
If Target = "Shifted" Or Target = "Expired" Then
Application.EnableEvents = False
nxtRow = Sheets("Cancel Name").Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy _
Destination:=Sheets("Cancel Name").Range("A" & nxtRow)
Target.EntireRow.Delete
End If
End If
Application.EnableEvents = True
End Sub
please help
Last edited by a moderator: