LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default option button dependant micro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option dependant upon entry!! Baffled Excel Discussion (Misc queries) 2 September 29th 08 10:05 PM
How to assing micro to a command button Qazi Ahmad Excel Discussion (Misc queries) 1 April 9th 07 06:38 AM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Option button help justaguyfromky Excel Programming 1 September 5th 05 10:17 PM
Option button Jennifer Excel Programming 3 April 15th 05 10:28 PM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"