Sir Babydum GBE
12-29-2017, 05:45 PM
I have code that pastes (xlValues) information from a worksheet into my target worksheet.
When I tested it, it worked perfectly
But in the non-test world the sheet is protected.
Of course in the protected sheet the code fails ("PasteSpecial method of range class failed")
Fair enough, So before the paste execution, I write into the code to unprotect the sheet. and re-protect it after the paste. But I still get the error! If I manually unprotect it and then run the macro, all is fine again! ("PasteSpecial method of range class failed")
What am I missing?
When I tested it, it worked perfectly
But in the non-test world the sheet is protected.
Of course in the protected sheet the code fails ("PasteSpecial method of range class failed")
Fair enough, So before the paste execution, I write into the code to unprotect the sheet. and re-protect it after the paste. But I still get the error! If I manually unprotect it and then run the macro, all is fine again! ("PasteSpecial method of range class failed")
What am I missing?