![]() |
double click macros
Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean) Set Target = Range("A1") If Target.Address = ActiveCell.Address Then MsgBox "Run Macro 1" Else Set Target = Range("A2") If Target.Address = ActiveCell.Address Then MsgBox "Run Macro 2" Else Set Target = Range("A3") If Target.Address = ActiveCell.Address Then MsgBox "Run Macro 3" End If 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. |
All times are GMT +1. The time now is 07:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com