double click macros
Maybe something like this
Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
Set Target = Range("A1")
If Target.Address = ActiveCell.Address Then
MsgBox "yes"
Else
Set Target = Range("A2")
If Target.Address = ActiveCell.Address Then
MsgBox "yes"
Else
MsgBox "no"
End If
End If
End Sub
"jack" wrote:
Can someone help me on how I can set up two different double click macros
(two different resulting actions) on the same worksheet for different
ranges. I have each macro starting with: Private Sub
Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean). I
found very quickly that it doesn't work. What do I need to do so that each
will work independently?
Any basic direction would be appreciated.
|