1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub Worksheet_Change(ByVal Target As Range)
Dim Index As Long
On Error GoTo Catch
If Target.CountLarge = 1 And Not Intersect(Target, Range("table1[requester]")) Is Nothing Then
Application.EnableEvents = False
If UCase(Target.Value) = "MODIFY" Or UCase(Target.Value) = "EXTEND" Then
Index = Target.Row - Range("table1[#headers]").Row
Range("table1").ListObject.ListRows.Add Index + 1
Target(2, 1).Validation.Delete
End If
End If
Catch:
Application.EnableEvents = True
End Sub |
Partager