assigning a macro


Posted by John on January 14, 2002 5:21 AM

How do I assign a macro to a cell so that it works on selection or double click?

cheers


John



Posted by Mamillius on January 14, 2002 6:20 AM


Put something like this in the worksheet code module :-

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then YourMacroName
End Sub