the error reads "code execution has been interrupted".
the code i am using is from a recorded sorting macro that spans 4 ranges of cells, most of the time the button i have assigned the macro to works, other times i get the error above.
a little insight as to what the workbook does, as it may or may not help, i am pulling from a range off of another workbook, a multitude of vlookups and concactnations as well as list validations are used to make a revolving list of rankings, i have a count macro tied to a forward button and as the user clicks the button the list "moves" forward throughout months, another button is used to "autosort" the list into proper rankings. I think it is a really nifty tool where people can gather trends and rankings over the course of the data (2 years)
but anyway, here is the macro i recorded earlier, any idea as to why i would be getting the error?
Code:
Sub AutoSort()
'
' AutoSort Macro
' Macro recorded 8/22/2007 by jl5327
'
'
Range("L17:L26").Select
Range("F17:M26").Sort Key1:=Range("L17"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("L31:L33").Select
Range("F31:M33").Sort Key1:=Range("L31"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("R17:R26").Select
Range("Q17:S26").Sort Key1:=Range("R17"), Order1:=xlDescending, Header:= _
xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("R31:R33").Select
Range("Q31:S33").Sort Key1:=Range("R31"), Order1:=xlDescending, Header:= _
xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("H2:M2").Select
End Sub
I wouldn't mind the issue, but the problem is that i will have multiple users looking at this work book.