Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default making a drop down to sort data


You can use the dialog method shown below

Range("a2:d971").Select
Set Sortdialog = Application.Dialogs(xlDialogSort)
With Sortdialog
.Show

End With

End Sub



The dialog has these options

'xlDialogSort orientation, key1, order1, _
'key2, order2, key3, order3, header, custom, case


So you can specify these arguments like this

Range("a2:d971").Select
Set Sortdialog = Application.Dialogs(xlDialogSort)
With Sortdialog
.Show arg1:=xlAscending, arg2:="$A:$A"

End With

End Sub


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=166926

Microsoft Office Help

Reply
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
Making a drop down control to choose a data series WallyWallWhackr Charts and Charting in Excel 0 June 30th 09 08:22 AM
how to sort the data in drop down list Sumeth Excel Discussion (Misc queries) 2 December 26th 07 04:32 PM
Sort data / items of drop down list Ulrik loves horses Excel Programming 2 October 9th 06 05:54 PM
sort data / items in drop down list Ulrik loves horses Excel Programming 0 October 9th 06 04:00 PM
Making data validation drop down list wider Steve E Excel Discussion (Misc queries) 5 August 15th 06 05:15 PM


All times are GMT +1. The time now is 07:09 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"