Solved command button code, sort

May 25, 2011 at 22:01:10
Specs: Windows XP
Hi - trying to sort a range using a COMMAND BUTTON from the CONTROL TOOLBOX menu not a FORMS button.
Code I have was recorded using VBA recorder:

Selection.Sort Key1:=Range("F2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Been all over the net, nothing out there!

Thanks,
Rowan.


See More: command button code, sort

Report •


#1
May 27, 2011 at 15:07:25
Hi - found the answer to this one...

Report •

#2
May 27, 2011 at 15:08:37
✔ Best Answer
Key1:=Worksheets("FIELDFINDER").Columns("F"), Order1:=xlDescending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Report •

Related Solutions


Ask Question