Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting a protected worksheet
Hi Vince
try activesheet.unprotect password:="yourpassword" Range(Cells(56, 2), Cells(rw, 2)).Select Selection.Sort Key1:=Range("B56"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom activesheet.protect password:="yourpassword" -- Regards Frank Kabel Frankfurt, Germany Vince wrote: I am using the following code to sort, and it works fine as long as the worksheet is not protected. When the worksheet is protected, I get the error 1004 Sort method of range class failed. I have made sure the cells that are being sorted are not protected, but I still get the error after I protect the worksheet. Any help would be appreciated. Range(Cells(56, 2), Cells(rw, 2)).Select Selection.Sort Key1:=Range("B56"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Thank you, Vince |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to allow sorting in a protected worksheet? | Excel Discussion (Misc queries) | |||
Sorting a protected worksheet | Excel Worksheet Functions | |||
Sorting a Protected Worksheet | Excel Discussion (Misc queries) | |||
Sorting on a protected worksheet | Excel Discussion (Misc queries) | |||
Sorting protected worksheet | Excel Discussion (Misc queries) |