jim may
Well-known Member
- Joined
- Jul 4, 2004
- Messages
- 7,484
In my app I' have previouly used similar code but for some reason I'm getting a r/t error 1004 as marked below. Can anyone spot the problem?
TIA,
Jim
TIA,
Jim
Code:
Sub TransferToNewPricesOnlySheet()
With Sheets("WorkingReport")
.Activate
.Unprotect Password:="john"
Lr = Range("A" & Rows.Count).End(xlUp).Row
.Range("A7:L" & Lr).Copy
End With
With Sheets("OnlyNewPrices").Range("A7")
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ 'Getting r/t 1004
SkipBlanks:=False, Transpose:=False
End With
ActiveSheet.Protect Password:="john"
Application.CutCopyMode = False
End Sub