• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA - Add a new column in multiple workbooks

Sanket Katdare

New Member
Hi All,

I am stuck on some unique issue and need your help.
I have 40+ protected excel workbooks in different subfolders, all these folders are located in the Root folder called “CSE”.

I am looking for VBA who will help me do the following
  1. Loop through each subfolder of “CSE”
  2. Open Excel Workbook available in Folder and go to sheet “Daily Report”
  3. Unprotect sheet “Daily Report” with Password “Password@1”
  4. Add new column at G column
  5. Name the newly added G Column as “Local / UC”
  6. Apply Data validation in newly added column G range “G2:G1901” – Values will Be – “Local”, “Up Country”
  7. Protect “Daily Report” with Password “Password@1”
  8. Save & Close the workbook.

Root Folder Path
C:\Users\Daily report Sheets \CSE
40 files/ folders are available in the root folder.

Could you please help me develop VBA code for this?

Thanks & Regards,
Sanket
 
Hi, to give it a try that needs some workbooks full names samples and a source sample workbook attachment​
or start yourself just activating the Macro Recorder …​
 
Back
Top