Thank you in advance for any assistance you can provide. I have a rather extensive VBA code that opens a locked workbook, opens a locked sheet, performs some functions, locks the sheets and finally locks the workbook. The code has worked well for us to this point but we now have a process that requires the function 'Format Columns' to be checked when the worksheet locks with VBA. I am not the original person who wrote the code but I think this is the line of the code may need to be modified from the Maineroutine Sub (full code below):
Please Login or Register to view this content.
Just to clarify the MaineRoutine as this may be where it need modified as mentioned above:Please Login or Register to view this content.
Sorry for it being a long post but the routine is much longer than what I have included above. I am just trying to modify this code to leave 'Format Columns' and 'Select Unlocked Cells' checked when it locks the worksheet (after running its routine). I have attempted to modify this with macro recorder but this code:Please Login or Register to view this content.
does not seem to work when inserted into the Private Sub IF statement. Excel returns an error stating that it needs to be defined.Please Login or Register to view this content.
I am at a loss as I am unsure how to properly address that small issue with an intricate code like this.
Any help at all is greatly appreciated.
Bookmarks