View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Link cell contents to a Macro?

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.