Can't sort whilst the sheet is protected
Presumably, you have some code attached to a button that does the sort...
before the sort code have the line
activesheet.unprotect password:="password"
and after the sort code
activesheet.protect password:="password"
obviously, change "password" to whatever the sheet's password is...
Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde