Is this possible?

  • Thread starter Thread starter neb
  • Start date Start date
N

neb

I have a spreadsheet with active columns from A6:X6. Active rows are up
to 10000.

I currently have the section linked and have made a sort macro. This
works well if the sheet is unprotected. But I will need to protect the
sheet in order for people to only enter data where I allow them to and
to protect the formulas in the other cells. With protection on, I
can't sort using the macro.

*Is it possible*: to write a macro that would select unprotect sheet,
type in the password DSKM, perform the alphabetical sort based on colum
B6, then reprotect the sheet using the same password? In other words,
unprotect the sheet only long enough for the sort and then reprotect
it.

Any help would be very much appreciated.

JEN
 
Good afternoon Neb

This should certainly be possible. Put this line before the sort
routine:

ActiveSheet.Unprotect Password:="DSKM"

and this line after the sort routine:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="DSKM"

HTH

DominicB
 

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