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.Count)
End If
Next
End Sub
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
Think this works. Thank you very much for your help.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.