Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Macro to merge open workbooks

Is there a small macro that will take all the worksheets from all open
workbooks and put them in one new consolidated workbook?

Thanks

Barry
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Macro to merge open workbooks

Try this Barry

Copy this macro in a new workbook and run it
Or do you want to use it in your personal.xls

Sub test()
Dim wb As Workbook
For Each wb In Application.Workbooks
If wb.Windows(1).Visible And wb.Path < "" And wb.Name < ThisWorkbook.Name Then
wb.Worksheets.Copy after:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Cou nt)
End If
Next
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Barry McConnell" wrote in message
...
Is there a small macro that will take all the worksheets from all open
workbooks and put them in one new consolidated workbook?

Thanks

Barry



Reply
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
Trying to Merge 2 Workbooks Anne Excel Discussion (Misc queries) 2 July 18th 06 08:28 PM
Merge using Excel 2002 and Hummingbird Docs Open 3.9.0 Build 199 a_ryan1972 Excel Discussion (Misc queries) 0 April 15th 05 01:45 PM
Button fails to call macro when open an Excel via Intranet tigertax Excel Discussion (Misc queries) 1 April 12th 05 10:21 AM
Macro in all workbooks Pam Coleman Excel Discussion (Misc queries) 2 February 24th 05 07:49 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 05:31 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"