Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row=1 and Target.Column=1 then
'do Stuff
End If
End Sub
a double click
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, _
ByVal Target As Range, ByVal Cancel As Boolean)
If Target.Row=1 and Target.Column=1 then
'do Stuff
End If
End Sub
or a right click
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, ByVal Cancel As Boolean)
If Target.Row=1 and Target.Column=1 then
'do Stuff
End If
End Sub
The code would go in VBA on the sheet where your target cell resides and not
a seperate module. Change the Target.Row=1 and Target.Column=1 to whatever
cell you desire.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.