View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Dave Dave is offline
external usenet poster
 
Posts: 1,388
Default Link cell contents to a Macro?

Thanks for the tip. Very helpful.

"Die_Another_Day" wrote:

Yes, Right-Click the sheet in question. Select "View Code". Use this
event:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address < Range("A1").Address Then 'Change A1 for your Cell
Exit Sub
End If
'Your Code to sort
End Sub

HTH

Charles Chickering

Dave wrote:
I'd like to call a macro that sorts a list simply by clicking on a header cell.
Sort Key1 = the cell that the user clicks on.
Can one call a macro by clicking on a cell or the contents of a cell?
If so, how?
Thanks very much.