View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Not using select for copy and paste

Maybe...

Dim FirstCell as range
dim LastCell as range
dim RngToCopy as range

with worksheets("recovered_sheet1")
set firstcell = .range("a10")
set lastcell = firstcell.cells.specialcells(xlcelltypelastcell)
set rngtocopy = .range(firstcell,lastcell)
end with

rngtocopy.copy _
destination:=worksheets("new format").range("a2")

application.cutcopymode = false



damorrison wrote:

Hi,

How could I use this code without the select??

Sheets("Recovered_Sheet1").Select
Range("A10").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Copy
Sheets("New Format").Select
Range("A2").Select
ActiveSheet.Paste
Application.CutCopyMode = False


--

Dave Peterson