Not using select for copy and paste
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 |
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 |
Not using select for copy and paste
Thank you very much
|
All times are GMT +1. The time now is 12:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com