Macro to merge open workbooks
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:
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
|