PasteSpecial ---> 1004

H

Hok

The following code generates error 1004
I can't find out the problem.
If I comment out the row with Pastespecial it works Ok.
Anybody?

RowCount = sStartRow
Do until Esheet.cells(Rowcount,sStartCol) = ""

Sheets(1).Range(Sheets(1).cells(sStartRow,sStartCol),Sheets(1).cells(sStartRow+sBandHight-1,sEndCol)).select
Selection.copy
Esheet.Range(Esheet.cells(Rowcount,sStartCol)).select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Rowcount = Rowcount + sBandHight
loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top