This VBA code has started returning the error message: "Run-time error '1004': "PasteSpecial method of Range class failed"
I use the VBA code to copy and paste a few cells to the next row. I often run it several times in succession. It never fails on the first pass. It worked for years before beginning to fail.
Sub CopyInfoToLineBelowSamePO_Ctrl_Shft_Y()
'
' CopyInfoToLineBelowSamePO_Ctrl_Shft_Y Macro
'
' Keyboard Shortcut: Ctrl+Shift+Y
'
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(-1, 5).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, -5).Range("A1").Select
End Sub
I think the failure occurs at this point (first appearance):
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False