Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Failed
All, I have this code and I cannot find out why it will not paste. I am
getting the following error when trying to run this macro "Runtime Error 1004: Paste method of worksheet class failed." Here is the code that I am trying to run: Sheets("CNP").Select Columns("A:Z").Select Selection.Delete Shift:=xlToLeft Range("A1").Select ActiveSheet.Paste Range("E:N,P:V,X:AC").Select Selection.Delete Shift:=xlToLeft Range("A1:F82").Select Selection.Copy Sheets("Daily").Select Range("A2:F82").Select Selection.ClearContents Range("A2").Select ActiveSheet.Paste Range("A6:F83").Select Application.CutCopyMode = False Selection.Sort Key1:=Range("F5"), Order1:=xlDescending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Sheets("CNP").Select Columns("B:E").Select Selection.Delete Shift:=xlToLeft Range("A:B").Select Selection.Copy Sheets("Data").Select Dim rFound As Range Set rFound = Sheet1.Cells.Find("*", _ Sheet1.Cells(1, 1), , , xlByColumns, xlPrevious) If rFound Is Nothing Then Range("A:B").Select Else rFound.Offset(0, 1).Resize(1, 2).EntireColumn.Select End If ActiveSheet.Paste End Sub It is failing on the second paste for some reason and I cannot figure out why. Any help would be greatly appreciated. Nathan Bell |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Method 'Paste' of object '_Worksheet' failed | Excel Discussion (Misc queries) | |||
Method 'Paste' of object '_worksheet' failed | Excel Programming | |||
VB Error: Paste Special method of range class failed | Excel Programming | |||
Cut Paste Undo Failed | Excel Programming | |||
Paste method of worksheet class failed error | Excel Programming |