Simple problem that I can't solve....
I use below VBA to paste a range of 100 cells, just to avoid any hassle and speed up the process. But I get an error.
ActiveSheet.Unprotect
Range("C6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
ActiveSheet.Protect
The error is in the "selection.pastespecial....", It seems that it happens because the sheet is protected and the cells are locked, and the "unprotect" code doesn't have time to react. If I run the macro again, it works, I guess this is because now the sheet is not protected anymore. If I unlock the cells it works fine, but I would prefer to have them locked.