I
Ikan
Hi everyone,
I'm new to using excel. I have created a template that includes in it
a macro that sorts customers by their last name. Works fine when I run
it with Sheet unprotected, but when I protect the Sheet an error
message comes out when I ty to run the macro again that reads:
Run time error '1004'
Sort method of Range class failed
Sheet Unprotected
Range("C6:C12").Select
Range("A5:K12").Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheet Protected ( second line down to last is highlighted)
Range("C6:C12").Select
Range("A5:K12").Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
I would appreciate very much any help regarding how to fix this
problem.
I'm new to using excel. I have created a template that includes in it
a macro that sorts customers by their last name. Works fine when I run
it with Sheet unprotected, but when I protect the Sheet an error
message comes out when I ty to run the macro again that reads:
Run time error '1004'
Sort method of Range class failed
Sheet Unprotected
Range("C6:C12").Select
Range("A5:K12").Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheet Protected ( second line down to last is highlighted)
Range("C6:C12").Select
Range("A5:K12").Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
I would appreciate very much any help regarding how to fix this
problem.