Sort on Protected Fields

P

PR

I am trying to Sort on Protected Field and unprotected fields, I have a spreadsheet that I have protected from users, but there is a need for them to sort the data range. Because some of the fields are protected the user gets an error when the macro is run to sort.



Can anyone help
 
T

Tom Ogilvy

ActiveSheet.Unprotect Password:="Monkey"
' code that sorts
Activesheet.Protect Password:="Monkey"


of couse you will need to protect your project for viewing so they can not
discover your code.
--
regards,
Tom Ogilvy


I am trying to Sort on Protected Field and unprotected fields, I have a
spreadsheet that I have protected from users, but there is a need for them
to sort the data range. Because some of the fields are protected the user
gets an error when the macro is run to sort.



Can anyone help
 
Top