View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Dynamic Sort Macro

Why not use the built-in dialog:

Range("NamedRange").Select
application.Dialogs(xlDialogSort).show

--
Regards,
Tom Ogilvy


Chris wrote in message
...
I need to create a macro and assign it to a button that
selects a named range and sorts. The issue is that the
sort key (Column) needs to be a prompted name from the
column headers. There are 12 column headers that could be
used. Likewise, the ascending or descending option needs
to be prompted. The idea is the user would click the sort
macro button, be prompted for one of the column headers
and then be prompted for ascending ro descending.

Thanks in advance.