kaisin,
Replace the old code with this and it should work fine.
Sub aaa()
Dim wsSht1 As Worksheet
Set wsSht1 = Sheets("Sheet B")
wsSht1.Range("B:C").Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
This takes into account that your button is on Sheet B and that you have a header row.
Are you also wanting to sort the other columns F and G. If so, are you wanting to do it at the same time you sort the other two columns. If you are, use this code
Sub aaa()
Dim wsSht1 As Worksheet
Set wsSht1 = Sheets("Sheet B")
wsSht1.Range("B:C").Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
wsSht1.Range("F:G").Sort Key1:=Range("F2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Hope all this works on your end.
Bookmarks