I have the following snippet where I am trying to copy a range from a different sheet to a new sheet.The first time when i run this sub,it throws out the 1004 error stating that paste special method failed.But the next time i run the same using a button it works.Any solutionto this is appreciated.(The commented ones are the things i tried)
Application.CutCopyMode = True
Range("T37:V1000").Select
Selection.Copy
Sheets("Summary").Select
Worksheets("Summary").Activate
ActiveSheet.Unprotect
'Worksheets("Summary").Range("C40").Select
'Worksheets("Summary").Activate
'Worksheets("Summary").Activate
'Range("C40").Select
'On Error Resume Next
'On Error GoTo ErrHandler:
Range("C40").PasteSpecial ' cause an error
Bookmarks