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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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