Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I ahve been using this code for almost a year wothout any trouble.
Recently it started to throw an error when it gets to the paste special line. The error says "PasteSpecial method of class range failed". Here is my code. Thanks, Jay Sub Cutting() Dim NextRow As Long Dim Datei As Date Datei = Range("E1") Range("A7:AB26, BL7:BM26").Copy Application.ScreenUpdating = False Workbooks.Open filename:="G:\DPE-IPE\DPE REVISIONS\All Press Ips.xls" Sheets("Cutting").Activate NextRow = Range("B65536").End(xlUp).Row + 1 Range("B" & NextRow).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Dim theRange As Range Dim lastRow&, firstRow&, x& Set theRange = ActiveSheet.UsedRange lastRow = theRange.Cells(theRange.Cells.Count).Row firstRow = NextRow For x = lastRow To firstRow Step -1 If Cells(x, 7) = "" And Cells(x, 12) = "" And Cells(x, 16) = "" _ And Cells(x, 20) = "" And Cells(x, 24) = "" And Cells(x, 28) = "" Then Rows(x).Delete End If Next Sheets("Cutting").Range("A" & NextRow).Resize(Range(Range("B" & NextRow), Range("B65536").End(xlUp)).Count, 1) = Datei Workbooks("All Press Ips.XLS").Close SaveChanges:=True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy and insert throwing error- help in code req | Excel Discussion (Misc queries) | |||
aconcat UDF throwing a #NAME error | Excel Worksheet Functions | |||
Special Paste Error...Data pastes into one column | Excel Discussion (Misc queries) | |||
When paste special links the file name gives error | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions |