Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.programming
external usenet poster
 
Posts: 11,123
Default Macro to merge open workbooks

See your other thread

--
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Macro to merge open workbooks

My intranet won't let me access that site. Can you please give me the code Ron?

"Ron de Bruin" wrote:

See your other thread

--
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




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

See Misc group where you also post
Please use one group

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
...
My intranet won't let me access that site. Can you please give me the code Ron?

"Ron de Bruin" wrote:

See your other thread

--
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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to merge open workbooks

Basic code would be:

Sub CopySheets()
Dim bk As Workbook, bk1 As Workbook
Set bk = Workbooks.Add()
For Each bk1 In Application.Workbooks
If bk1.Windows(1).Visible Then
Application.DisplayAlerts = False
bk1.Worksheets.Copy After:=bk.Worksheets(bk.Worksheets.Count)
Application.DisplayAlerts = True
End If
Next
End Sub


--
Regards,
Tom Ogilvy


"Barry McConnell" wrote:

My intranet won't let me access that site. Can you please give me the code Ron?

"Ron de Bruin" wrote:

See your other thread

--
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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Macro to merge open workbooks

Yeah sorry, posted in general by mistake.

Think this works. Thank you very much for your help.

"Ron de Bruin" wrote:

See Misc group where you also post
Please use one group

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
...
My intranet won't let me access that site. Can you please give me the code Ron?

"Ron de Bruin" wrote:

See your other thread

--
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
Run Macro In All Open Workbooks Chacky Excel Discussion (Misc queries) 2 August 6th 08 09:34 AM
Macro to merge open workbooks Barry McConnell Excel Programming 1 August 23rd 06 05:29 PM
Macro to merge open workbooks Barry McConnell Excel Discussion (Misc queries) 1 August 23rd 06 05:09 PM
macro to merge workbooks Koda Excel Programming 0 July 14th 05 01:41 PM
Excel macro to open word mail merge Chad Excel Programming 0 May 30th 04 01:06 AM


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

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

About Us

"It's about Microsoft Excel"