LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copy from one book to another

Public newWorkBook As Excel.Workbook

Sub copy()
Set newWorkBook = Application.Workbooks.Add

this code copies current region
Workbooks("book2").Sheets("Sheet1").Range("A1").Cu rrentRegion.cop
Destination:=newWorkBook.Sheets("sheet1").Range("a 1")

this code copies all cells
Workbooks("book2").Sheets("Sheet1").Cells.cop
Destination:=newWorkBook.Sheets("sheet1").Range("a 1")


End Su

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not copy a sheet to another book dveer Excel Worksheet Functions 7 April 28th 10 03:47 PM
Too Few Rows to copy sheet to another book snowboardbaltimore Excel Worksheet Functions 2 April 19th 10 05:36 PM
Copy sheets into one book Eva Excel Worksheet Functions 2 November 17th 09 06:43 PM
copy worksheets to new book without linking to original book Lori Excel Discussion (Misc queries) 2 March 4th 09 04:46 PM
Pivot Table: Copy from one Book to another cas4g5 Excel Discussion (Misc queries) 1 February 25th 07 03:29 PM


All times are GMT +1. The time now is 04:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"