Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic - active macro on cell click
This must be really obvious but I cannot find this anywhere in HELP. I want
to set up the worksheet so that if a cell is double clicked by the user then a particular macro will run automatically |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic - active macro on cell click
Have a look at the Worksheet_BeforeDoubleClick event Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cance As Boolean) Your code here e.g. test for target.cell.address If address = A1 do something end if End Su -- mudrake ----------------------------------------------------------------------- mudraker's Profile: http://www.excelforum.com/member.php...nfo&userid=247 View this thread: http://www.excelforum.com/showthread.php?threadid=57363 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic - active macro on cell click
Brettjg wrote:
This must be really obvious but I cannot find this anywhere in HELP. I want to set up the worksheet so that if a cell is double clicked by the user then a particular macro will run automatically Hi Brettjg, Right click the sheet tab you want this behaviour, select View Code and copy & past this code: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, "A1") Is Nothing Then Call MyMacro End Sub change A1 with your target cell or range and MyMacro with the name of your macro. -- Hope I helped you. Thanks in advance for your feedback. Ciao Franz Verga from Italy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual basic macro move cursor down 1 cell | Excel Worksheet Functions | |||
visual basic macro help | Excel Programming | |||
Can I run Visual Basic procedure using Excel Visual Basic editor? | Excel Programming | |||
Visual Basic Macro | Excel Discussion (Misc queries) | |||
This option(Trust access to visual basic project ) is not active . | Excel Programming |