View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Mirco Wilhelm[_2_] Mirco Wilhelm[_2_] is offline
external usenet poster
 
Posts: 6
Default Error 1004, Application-definded or object-defined error

"Dave Peterson" wrote in message
...
Worksheets(strDestWorksheetame).Range(Cells(lngLas tRow, 1), _
Cells(lngLastRow + 52, 10)).PasteSpecial xlPasteAll

I'd qualify them using with/end with (to save typing):

with Worksheets(strDestWorksheetame)
.Range(.Cells(lngLastRow, 1), _
.Cells(lngLastRow + 52, 10)).PasteSpecial xlPasteAll
end with


Ok, it worked to some degree, but now it stops at this line:

Worksheets(strDestWorksheetName).Cells(lngLastRow, 1).Select

I tried putting it into the with and switch from select to activate,
replacing cells with range, but it won't work unless I activate the whole
sheet, which leaves the selection of the copied content active.