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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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,215,461
Messages
6,124,954
Members
449,198
Latest member
MhammadishaqKhan

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