I want to have a specially formatted/formulated row (from a template worksheet) pasted onto the same row that's being modified on the main worksheet. This is what I have so far, but getting a run-time error 1004:
"PasteSpecial method of Ranged class failed"
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("A5:A10000")
'the template of a very long formatted row with formulats
Set TemplateRow = ActiveWorkbook.Worksheets("Templates").Range("A1:BB1")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
TemplateRow.Copy
Range(Target.Address).PasteSpecial Paste:=8
Range(Target.Address).PasteSpecial Paste:=-4104
Application.CutCopyMode = False
Else
Range(Target.Address).EntireRow.Delete
End If
End Sub