I have the below code in one of my Macros:
ThisWorkbook.Worksheets(WsNameTo).Range("ag35:ai53").Value = wb.Worksheets(WsNameFrom).Range("e7:g25").Value
Every time I run my macro, the range of cells being copied into picks up the Locked attribute, which then interferes the next time I try to run the macro since the worksheet is protected and that range is now locked, causing an error. Is the .Value picking up the Locked Property or is something else in my code possibly causing the issue? If .Value is picking up the Locked property, is there another method to get the value of the cells without locking it?
r/
SUPPO
Bookmarks