Hi
Your code is over complicated.
But I have amended it for you.
You should really be using a command button for this. I have added one for you.
Private Sub CommandButton1_Click()
Worksheets("Sheet2").Range("A4:CG87").Select
Selection.Sort Key1:=Range("D4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Private Sub OptionButton1_Click()
If OptionButton1.Value = True Then
Worksheets("Sheet2").Range("A4:CG87").Select
Selection.Sort Key1:=Range("D4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub
Bookmarks