Macro to Cell
Hi,
You could use the Worksheet_SelectionChange event.
For example, assuming the cell to be D10
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address="$D$10" then
MsgBox Target.Address
End If
End Sub
or using row and column numbers
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 10 And Target.Column = 4 Then
MsgBox Target.Address
End If
End Sub
In place of the MsgBox, you could enter code or call a macro.
Hope that gets you started.
Don
"Ronbo" wrote in message
...
How do I assign a macro to a cell so that when one clicks on it a Listbox
opens or a macro runs?
Thanks
|