Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created six macro that sort one of six columns (macro 1 sorts
column by column A, macro 2 sorts by column B, etc. I have created a user form (with option buttons) that allows the user to select if the sorting is Ascending (optAsc) or Descending (optDes), then select an option button (optDealer, optSig, optPO, optInv, optDate and optDue) to decide which of the 6 columns is actually sorted. (See code at bottom for one example.) I can not figure out how to make the action dependant upon which option button is selected. Any ideas? Sub alphabyDealerName() 'macro "Sheet1.alphabySignature" , sorts alphabetical by "Dealer Name(A2)" Range("Database").Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub (I know that I can change xlAscending to xlDescending to swap directions) TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Option dependant upon entry!! | Excel Discussion (Misc queries) | |||
How to assing micro to a command button | Excel Discussion (Misc queries) | |||
keep source formatting is not an option in paste option button | Excel Discussion (Misc queries) | |||
Option button help | Excel Programming | |||
Option button | Excel Programming |