Hello,
I have been having issues with the code below and for the life of me cannot figure it out. It seems to run once, then after that I get the Run-Time error '1004': PasteSpecial method of Range class failed.
The first part of the code copies the range A1:CC200 from the sheet that the user is working on. It is run from a hyperlink that calls the code. The paste part of the code is pasting to a xlVeryHidden worksheet that is password protected (this is where I get the Error Message). After this code is run I am using the Workbook_SheetDeactivate and the GoToPreviousSheet() code to return the user to the sheet that the code was originally executed from.
Any help would be greatly appreciated.
Sincerely,
Scott
HTML
Sub CopySaleInfoToBuyerEmailsSheet()
'
' This macro copies the current sale information starting from the Active worksheet
' to the "Emails" worksheet to start an email
'
Range("A1:CC200").Copy
Sheets("BuyerEmails").Unprotect "Scott"
Sheets("BuyerEmails").Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("BuyerEmails").Protect "Scott", DrawingObjects:=False, Contents:=True, Scenarios:=True, AllowInsertingHyperlinks:=True
Application.CutCopyMode = False
End Sub
Display More