I have a simple macro to copy/paste rows into a worksheet. The user clicks a button to add additional rows. If I click it the first time, it works. If I click it the second time, I get this message: "Rutntime 1004: Unable to get the pastespecial quality of the worksheet class". Any help would be much appreciated...thanks!
Sub CopyBlock()
Sheets("Data").Select
Range("ToCopy").Select
Selection.Copy
Sheets("New").Select
With ActiveSheet
.Unprotect
Sheets("New").Select
Cells.Find(What:="EOF", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.Offset(-1, 0).Range("A1").Select
Selection.Insert Shift:=xlDown
Selection.PasteSpecial .PasteSpecial - 4122
ActiveCell.Offset(1, 0).Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End With
End Sub
Bookmarks