Terry Echols
New Member
- Joined
- Jul 14, 2015
- Messages
- 38
It was suggested that I post a new topic as I was asking in others not completely related to what I need to accomplish.
I am not very good with VBA, I guess I know enough to get into trouble with it, but not enough to write code from scratch.
My setup is this:
Files are in folders by year and month
Example:
Folder: 2017 Service Calls
Sub-folders: January 2017 (and all the way through the year for every year)
Files: Monday, January 4, 2017.xlsm (all of my daily files are built off of a template and the naming convention is the same through, if that matters)
So I have the same setup for 2013-2017 (all naming conventions are the same year to year)
I want to lock/protect sheet from editing all the files in each sub-solder (monthly) contained in the Main year folder.
So basically I have almost 365 files each in 12 sub-folders then in a main folder by year.
Please help. I don't want to have to - open/protect sheet on 1000's of files, I have main folders going back to 2013.
Each spreadsheet file is built off of the same template and each workbook has two worksheets (one is called "CALLS" and the other is called "DD-INFO" - the DD-INFO file is password protected and hidden and is used for drop-down information on the CALLS sheet).
If I do this manually I open the file, right click on the CALLS sheet and select "Protect Sheet", I make no changes to the options in the pop-up window, (boxes checked are "Protect worksheet and contents of locked cells" then "Select locked cells" and "Select unlocked cells"). I do not add a password.
To recap:
One folder for each year
One folder for each month in the year
An excel workbook for everyday in the month (M-F) that we are open.
How can I loop through all the year folders then the month folders and then lock/protect sheet from editing each daily excel file? I have searched and searched but can't find anything (code) that does what I need that I have the expertise to edit.
I need to Protect them from editing but I don't want to use a password when opening. Basically these will be search files only that nobody can edit.
I sure don't relish the idea of do this manually for 1000's of files.
Any help is greatly appreciated.
Terry
I am not very good with VBA, I guess I know enough to get into trouble with it, but not enough to write code from scratch.
My setup is this:
Files are in folders by year and month
Example:
Folder: 2017 Service Calls
Sub-folders: January 2017 (and all the way through the year for every year)
Files: Monday, January 4, 2017.xlsm (all of my daily files are built off of a template and the naming convention is the same through, if that matters)
So I have the same setup for 2013-2017 (all naming conventions are the same year to year)
I want to lock/protect sheet from editing all the files in each sub-solder (monthly) contained in the Main year folder.
So basically I have almost 365 files each in 12 sub-folders then in a main folder by year.
Please help. I don't want to have to - open/protect sheet on 1000's of files, I have main folders going back to 2013.
Each spreadsheet file is built off of the same template and each workbook has two worksheets (one is called "CALLS" and the other is called "DD-INFO" - the DD-INFO file is password protected and hidden and is used for drop-down information on the CALLS sheet).
If I do this manually I open the file, right click on the CALLS sheet and select "Protect Sheet", I make no changes to the options in the pop-up window, (boxes checked are "Protect worksheet and contents of locked cells" then "Select locked cells" and "Select unlocked cells"). I do not add a password.
To recap:
One folder for each year
One folder for each month in the year
An excel workbook for everyday in the month (M-F) that we are open.
How can I loop through all the year folders then the month folders and then lock/protect sheet from editing each daily excel file? I have searched and searched but can't find anything (code) that does what I need that I have the expertise to edit.
I need to Protect them from editing but I don't want to use a password when opening. Basically these will be search files only that nobody can edit.
I sure don't relish the idea of do this manually for 1000's of files.
Any help is greatly appreciated.
Terry