Copying the first sheet from all protected workbooks in a folder

Nic2

New Member
Joined
Sep 14, 2020
Messages
5
Office Version
  1. 365
  2. 2019
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!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I suggest you to use power query to consolidate all sheets into one .
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,943
Members
448,534
Latest member
benefuexx

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