Need to import 4 sheets from 50+ workbooks into a summary sheet

JabirS

New Member
Joined
Jan 16, 2021
Messages
2
Office Version
  1. 365
Apologies if I'm not explaining this well; I'm a novice at VBA.

I need 4 sheets to be extracted from 50 workbooks and copied into a summary. The VBA needs to work in the background. Can anyone help. I wore this code but it's
clunk and doesn't repeat.

Sub CopySheetFromClosedWB()
Application.ScreenUpdating = False

Set closedBook = Workbooks.Open("D:\Dropbox\excel\articles\example.xlsm")
closedBook.Sheets("Sheet1").Copy Before:=ThisWorkbook.Sheets(1)
closedBook.Close SaveChanges:=False

Application.ScreenUpdating = True
End Sub
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi JabirS. So 4 sheets from each of the 50 workbooks? What are the sheet names? Where are the files... all in 1 folder? Dave
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top