Sort on Protected Fields

  • Thread starter Thread starter PR
  • Start date Start date
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
 
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
 
Which Excel version ?

In 2002-2003 this is a option when you protect your sheet
In 97-2000 you can use a macro to unprotect/Sort/protect

--
Regards Ron de Bruin
http://www.rondebruin.nl


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
 
version 2003, I have selected to allow sort, but this still does not work
Which Excel version ?

In 2002-2003 this is a option when you protect your sheet
In 97-2000 you can use a macro to unprotect/Sort/protect

--
Regards Ron de Bruin
http://www.rondebruin.nl


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
 
Yes, Sorry the cells that you want to sort can't be locked
The macro solution is the best thing for you

--
Regards Ron de Bruin
http://www.rondebruin.nl


version 2003, I have selected to allow sort, but this still does not work
Which Excel version ?

In 2002-2003 this is a option when you protect your sheet
In 97-2000 you can use a macro to unprotect/Sort/protect

--
Regards Ron de Bruin
http://www.rondebruin.nl


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top