kevkni
03-20-2013, 04:37 AM
Hi, I'm hoping that somebody can help me!
I have nearly 200 Excel files that all contain the same VBA macro. However as these files are all distributed to multiple users, the macro in question is protected to prevent users from accidentally amending the code.
I now need to amend the code in each of these files, and rather than working my way through each file one by one, I'm looking for a way to do this using a macro routine.
I already have a routine which works through the files making changes to each Excel file in turn, but currently the changes are to the worksheets themselves, and not the protected VBA code in each file.
There are two adjustments to the code that I need to make:
1. In a module called PackProtection, I need to amend the code from "AllowFormattingColumns:=False" to "AllowFormattingColumns:=True"
2. In a module called StartNewMonth, I need to add some additional (pre-written) code which resets the value in one particular cell (which has an identical cell address in each of the excel files) from "Yes" to "No"
Is there a relatively straightforward way of being able to update the VBA code in each of the Excel files by modifying my current routine? :dunno
Thanks
Kevin
I have nearly 200 Excel files that all contain the same VBA macro. However as these files are all distributed to multiple users, the macro in question is protected to prevent users from accidentally amending the code.
I now need to amend the code in each of these files, and rather than working my way through each file one by one, I'm looking for a way to do this using a macro routine.
I already have a routine which works through the files making changes to each Excel file in turn, but currently the changes are to the worksheets themselves, and not the protected VBA code in each file.
There are two adjustments to the code that I need to make:
1. In a module called PackProtection, I need to amend the code from "AllowFormattingColumns:=False" to "AllowFormattingColumns:=True"
2. In a module called StartNewMonth, I need to add some additional (pre-written) code which resets the value in one particular cell (which has an identical cell address in each of the excel files) from "Yes" to "No"
Is there a relatively straightforward way of being able to update the VBA code in each of the Excel files by modifying my current routine? :dunno
Thanks
Kevin