I have a worksheet that I have data below row 11.
Rows 1 thru 11 are protected with password.
Rows 12 on down are unprotected.
The macro does a number of things and then sorts the data.
It works fine when the protection is turned off (no password)
When I enter the password, the macro will not sort and it will not sort manually either.
I need a way in the macro, before the sort code, to unprotect (using the password automatically) then allowing the macro to continue on and when finished, the password would again protect the sheet with the same password.
Does anyone know the code for doing this. I believe that I seen this some years back, but no idea on the syntax.
Bookmarks