Hi
I have following codes, there is a problem in these codes, when I write mistakenly any word or number instead of D or d in target column then macro stops to work even I write again D or d then macro does not work and I have close workbook and reopen it and write correct word to get the macro worked. Could anybody give me some help to correct it ?
I have following codes, there is a problem in these codes, when I write mistakenly any word or number instead of D or d in target column then macro stops to work even I write again D or d then macro does not work and I have close workbook and reopen it and write correct word to get the macro worked. Could anybody give me some help to correct it ?
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 11 Then
Application.EnableEvents = False
If Target.Value = "D" Or Target.Value = "d" Then
Target.EntireRow.Copy
Worksheets("Issued Record").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteAll
Target.EntireRow.Delete
Application.EnableEvents = True
Exit Sub
End If
End If
End Sub