Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One of many macros in this sheet sorts a range of data based on
specific key cells. The sort will not execute if the worksheet is protected. It gives the following error: Runtime Error '1004' Sort method of range class failed. Here is the code at the point where it fails: Range("A7:I999").Select Selection.Sort Key1:=Range("A8"), Order1:=xlAscending, Key2:=Range("B8") _ , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom All the cells in that range are unlocked. I've tried reducing the range size to only one or two cells to isolate the offender, but the error persists. Of course, VBE help was none. Thanks to all. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding and compiling list of cells containing data... | Excel Worksheet Functions | |||
Macro Errs when sheet is protected | Excel Worksheet Functions | |||
Can a macro format a hidden sheet? | Excel Discussion (Misc queries) | |||
how to hide rows in a protected sheet | Excel Worksheet Functions | |||
Why can't my macro use Auto Filter when I told the Sheet Protecti. | Excel Worksheet Functions |