View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default are default values possible for "Application.Dialogs(xlDialogSortSpecial).show "?

Rob,

The "Built-In Dialog Box Argument Lists" help file topic in XL 97 shows
several options that can be applied...

"xlDialogSortSpecial sort_by, method, key1, order1, key2, order2, key3, order3, header, order, case"

Regards,
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"broro183"
wrote in message
Hi all,
Is it possible to provide default values for a user when using
"Application.Dialogs(xlDialogSortSpecial).Show " on a "user interface
only" protected sheet?

I'd like to use the following recorded code* to provide default values
in the "SortSheet" macro.

*Selection.Sort Key1:=Range("B12"), Order1:=xlDescending, Key2:=Range(
_
"D12"), Order2:=xlDescending, Key3:=Range("E12"),
Order3:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=False,
Orientation:= xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:=xlSortNormal, DataOption3:=xlSortNormal

Sub SortSheet()
'to allow sheet sorting on the "user interface only" protected sheet &
requires use of a _
named range "Sort_Area"
Range("'" & ActiveWorkbook.Name & "'!Sort_Area").Select
Application.Dialogs(xlDialogSortSpecial).Show
'optional MsgBox "Page is sorted as requested."
End Sub

thanks in advance,
Rob Brockett
NZ
Always learning & the best way to learn is to experience...
--
broro183