seakoot
06-08-2008, 01:02 PM
Hello! Is it possible to put two macros under one button. I made a macro to sort my table, but is it possible to make it so that if I press the button it will sort it A to Z and when I press it again it will sort the table from Z to A.
At the moment my code is:
Sub Klass1_AZ()
Range("start1:end1").Select
Selection.Sort Key1:=Range("start1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
It is a standard Macro recording code.
I hope it can be done!
thanks.
At the moment my code is:
Sub Klass1_AZ()
Range("start1:end1").Select
Selection.Sort Key1:=Range("start1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
It is a standard Macro recording code.
I hope it can be done!
thanks.