I have an excel file that has a macro that deletes and creates columns. I recently had to protect all the cells that contain formulas because end users were accidentally overwriting them.
Now my problem is the Macro will not delete the columns because they contain protected cells.
I would like to run a command at the beginning of the macro and at the end of the macro that will unprotect the worksheet then run the normal operations, then at the end of the macro I would like it to protect the worksheet again.
I found the code to protect a specific worksheet name;
but my macro will be ran on a number of different worksheet tabs and I don't want to have to createa a different macro for each. Is there a way to call out the ACTIVE worksheet only when the macro is ran?