Hi,
If the OER Dashboard Report isn't the active sheet at the time you invoke the sort then you will encounter an error. Try a fully defined sort range. i.e.
Sub sortstores()
Sheets("OER Dashboard Report").Unprotect Password:="Grimmer"
Sheets("OER Dashboard Report").Range("C11:Y89").Sort Key1:=Sheets("OER Dashboard Report").Range("F1"), _
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Sheets("OER Dashboard Report").Protect Password:="Grimmer"
End Sub
or perhaps more elegantly with a WITH statement
Sub sortstores()
With Sheets("OER Dashboard Report")
.Unprotect Password:="Grimmer"
.Range("C11:Y89").Sort Key1:=.Range("F1"), _
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
.Protect Password:="Grimmer"
End With
End Sub
HTH
Bookmarks