View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default macro that uses column headings as column sort 'buttons'

using this macro:

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)

End Sub

i think you could do what you want. you'd have to set the target
range as the header row, & you'd have to double-click, not single-
click. but i don't have any experience with it. search the newsgroup
for "workbook_sheetbeforedoubleclick" & i'll bet you'll get some
ideas.

since this macro is a workbook macro, you have to put it in the
"ThisWorkbook" object.
hope it gets you started!
:)
susan




On Jan 22, 2:33*pm, Rob Benz
wrote:
This can be done in a word table via a macro; can it be done in Excel?

Click on any column heading and entire spreadsheet is sorted on that column.