View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_128_] mudraker[_128_] is offline
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