View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Merging Two (or more) Workbooks

With Workbooks("Book3.xls")
workbooks("Book1.xls").sheets.copy After:=.Sheets(.Sheets.count)
workbooks("Book2.xls").sheets.copy After:=.Sheets(.Sheets.count)
End with

--
Regards,
Tom Ogilvy

"Chaplain Doug" wrote in message
...
Sorry Tom. May I ask for more detail?

If I have book1 and book2 and I want to merge them into book3, what would
the code look like? Thanks.

"Tom Ogilvy" wrote:

copy and paste. Select all the sheets in one workbook and do Move or

copy
Sheet in the Edit menu. Select a destination in the dropdown and if you
want to copy , click the copy checkmark

With Workbooks("NewBook.xls")
activeworkbook.Sheets.Copy After:=.Sheets(Sheets.count)
End With

--
Regards,
Tom Ogilvy

"Chaplain Doug" wrote in

message
...
Excel 2002-2003. How do I programmatically merge two or more

workbooks.
How
do I manually merge two or more workbooks. Thanks for any help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org