A
aeddave
I assigned a recorded macro to an object. When clicked it sorts range
A12:A2500. It works fine until I turn on sheet protection. The range is not
protected, nor is the object.
I receive the error above with "Sort method of range class failed".
Debugging shows below with "Selection....normal" highlighted.
Any help is appreciated
Sub SortByType()
'
' SortByType Macro
' Macro recorded 1/29/2008 by mcgind1
'
'
Range("A12").Select
Application.Goto Reference:="R12C1:R5000C7"
Selection.Sort Key1:=Range("B12"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A12").Select
End Sub
A12:A2500. It works fine until I turn on sheet protection. The range is not
protected, nor is the object.
I receive the error above with "Sort method of range class failed".
Debugging shows below with "Selection....normal" highlighted.
Any help is appreciated
Sub SortByType()
'
' SortByType Macro
' Macro recorded 1/29/2008 by mcgind1
'
'
Range("A12").Select
Application.Goto Reference:="R12C1:R5000C7"
Selection.Sort Key1:=Range("B12"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A12").Select
End Sub