Copying the first sheet from all protected workbooks in a folder

Nic2

New Member
Joined
Sep 14, 2020
Messages
1
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello, I need some help. This is my first time posting here so apologies if I overlook something. I'm a VBA novice and I did search for a solution but haven't been able to find anything that works for me yet.
I'm trying to copy the first sheet from 40+ department workbooks into a new consolidated workbook. All of the file names start with "2020-Q2-" and all workbooks are protected with the same password. Only the workbook structure is protected, not the file itself, no password is needed to open the file. The name of the first sheet in each workbook differs and should remain the same when copied to the new consolidated workbook.

After copying the first sheet from each department workbook to a consolidated workbook, the departmental workbook doesn't have to be protected anymore but I do want to password protect each of the department files with the same password so that they can only be opened as "Read-Only" by users without the password going forward.

Any assistance is much appreciated!
 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

earthworm

Active Member
Joined
May 19, 2009
Messages
368
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I suggest you to use power query to consolidate all sheets into one .
 

Watch MrExcel Video

Forum statistics

Threads
1,119,012
Messages
5,575,545
Members
412,677
Latest member
Davejf81
Top