The following macro I run from a custom button on a custom toolbar:

Sub SortRef()

Range("G6:T1000").Select
Selection.Sort Key1:=Range("G6"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom
Range("H6:H1000").Select
Selection.Font.ColorIndex = 10
Range("I6:I3000").Select
Selection.Font.ColorIndex = 41
Range("J6:J3000").Select
Selection.Font.ColorIndex = 13
Range("L6:L3000").Select
Selection.Font.ColorIndex = 3
Range("G4").Select

End Sub

When it's run the following message appears:

'Object library invalid or contains references to object definitions that
could not found'

Anyone know how to fix this?

Thank you
Pat