Disclaimer: I have a basic understanding of scripting.
I've created a toggle button and I want it to toggle ascending & descending in a range of cells. I've been trying to do just a column cell range with this script, but I don't like how it collapses up to the top.
I've also been playing (and really like this one!) with this script to sort a range based on what cell is selected, but can't figure out how to get it to attach to ToggleButton6.
Any help/educating is appreciated!
I've created a toggle button and I want it to toggle ascending & descending in a range of cells. I've been trying to do just a column cell range with this script, but I don't like how it collapses up to the top.
PHP:
Private Sub ToggleButton6_Click()
If ActiveSheet.AutoFilterMode = True Then
'autofilter is on...
ActiveSheet.AutoFilterMode = False
Else
'autofilter is not on...
ActiveSheet.Range("$D$3:$D$500").AutoFilter Field:=1, Criteria1:="D"
End If
End Sub
I've also been playing (and really like this one!) with this script to sort a range based on what cell is selected, but can't figure out how to get it to attach to ToggleButton6.
PHP:
Sub Sort_Me_Please()
Selection.Resize(67, 1).Select
Selection.Sort Key1:=ActiveCell, Order1:=xlAscending, Header:=xlNo
End Sub
Any help/educating is appreciated!