You need to unprotect the sheet at the start of the routine and restore the protection at the end. If the sheet is password protected by the user, then your code won't know the password and you are out of luck. To test if the worksheet has been protected, look at the sheet's .ProtectContents property.
Bookmarks