View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Code Numpty Code Numpty is offline
external usenet poster
 
Posts: 94
Default Run-time error €˜1004

I have the following macro in a workbook and a user keeps getting the same
runtime error that I cannot duplicate.

MACRO CODE---------------------------------
Sub Quote_Wrapup()
'To stop screen flicker
Application.ScreenUpdating = False

Range("quote_date").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Range("qdata5,qdata6").Font.ColorIndex = 2

'To delete delivery address lines if 1st line empty
If IsEmpty(Range("deliver_line1")) _
Then Sheets(1).Range("deliver_rows").EntireRow.Delete
'No End If required as only one action as a result of the If

Range("Item_Nos").SpecialCells(xlCellTypeBlanks).E ntireRow.Delete

Call paste_values

Sub paste_values()
With Sheet1.Range("A:F")
.Copy
.PasteSpecial xlPasteValues
End With
Application.CutCopyMode = False
End Sub
------------------------------------------------------
The user gets

Run-time error €˜1004
The information cannot be pasted because the copy area and the paste area
are not the same size and shape.

and the when debugged the following line is highlighted.
.................................................. .......................
.PasteSpecial xlPasteValues
.................................................. .......................

As the copy range is ("A:F") .i.e. columns I don't understand how this can
happen.

Grateful for any advice on this puzzle.