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
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