ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is this possible? (https://www.excelbanter.com/excel-programming/334953-possible.html)

neb[_2_]

Is this possible?
 

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


--
neb
------------------------------------------------------------------------
neb's Profile: http://www.excelforum.com/member.php...o&userid=17597
View this thread: http://www.excelforum.com/showthread...hreadid=388414


neb[_3_]

Is this possible?
 

Please forgive my poor use of terms. I have the selection grouped, not
linked...sorry.


--
neb
------------------------------------------------------------------------
neb's Profile: http://www.excelforum.com/member.php...o&userid=17597
View this thread: http://www.excelforum.com/showthread...hreadid=388414


dominicb[_63_]

Is this possible?
 

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


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=388414


neb[_4_]

Is this possible?
 

Wow! Did you just make my life easier!

Many thanks.

JE

--
ne
-----------------------------------------------------------------------
neb's Profile: http://www.excelforum.com/member.php...fo&userid=1759
View this thread: http://www.excelforum.com/showthread.php?threadid=38841


dominicb[_64_]

Is this possible?
 

Hi Jen

You're welcome. Appreciate the feedback.

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=388414



All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com