Hi All,
I am trying to use one single toggle button to sort a sheet that can be downloaded HERE. Currently I have to use 2 buttons to do what I want.
I would like to combine both buttons into one button that changes text based on the 2 sort options. If the sheet is sorted by TEAM (team numbers are on left) the button should show "Sort By DF/SF". Then when I press the button again the sheet should sort by DF/SF (black letters on top and red on the bottom) and the button should change to "Sort By Team"
I've tried this but it didn't work.
Sub Button1_Click()
If ActiveSheet.Shapes("Button 1").TextFrame.Characters.Text = "Sort By Team" Then
ActiveSheet.Shapes("Button 1").TextFrame.Characters.Text = "Sort By DF/SF"
Call SortTeam
Else
ActiveSheet.Shapes("Button 1").TextFrame.Characters.Text = "Sort By Team"
Call SortDFSF
ActiveSheet.Range("J3").Select
End If
End Sub
Display More
Of course I do have 2 macros that are called "SortTeam" and another called "SortDFSF" They work fine with 2 separate buttons.
I have posted HERE as well. Don't mean to cross post but I did include the link to the other post!!