Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
PasteSpecial failed
The following code snip runs fine five or ten times in a row and then fails
time after time with a 1004 "PasteSpecial method of range class failed" message. Can someone please tell me why it would work and then fail at random? Sub Copy() Sheets("Sheet2").Select Range("A3:C55").Select Selection.Copy Sheets("Sheet3").Select ActiveSheet.Unprotect Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select 'Alway fails on next line Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Sheet3").Cells(65536, 1).End(xlUp).Select Application.CutCopyMode = False Selection.ClearContents ActiveSheet.Protect Sheets("Sheet2").Select Application.CutCopyMode = False Application.ScreenUpdating = True Range("D1").Select End Sub Thanks for any help Coy Robbins |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
key shortcut for PasteSpecial-Values | Excel Discussion (Misc queries) | |||
PasteSpecial Method Error | Excel Discussion (Misc queries) | |||
Using a PasteSpecial within a Destination:= line | Excel Worksheet Functions | |||
Automate Copy / PasteSpecial | Excel Worksheet Functions | |||
pastespecial | Excel Programming |