Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Is there a double click event for cell?
I am looking for a function that would perform a set of actions when I double
click a cell in a worksheet. I know there is something like this in Access. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Is there a double click event for cell?
You would use the BeforeDoubleClick event of the worksheet and use the
Target argument (cell double clicked is passed into the event procedure via this argument) to filter on the cell you are interested in. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) If Target.Address = "$C$8" Then ' ' Cell C8 was double clicked ' Put your code for it here ' End If End Sub Note: Double clicking a cell usually puts Excel into edit mode within that cell. If you don't want that to happen, set the Cancel argument to True. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) If Target.Address = "$C$8" Then Cancel = True ' ' Cell C8 was double clicked ' Put your code for it here ' End If End Sub Rick "Ayo" wrote in message ... I am looking for a function that would perform a set of actions when I double click a cell in a worksheet. I know there is something like this in Access. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Is there a double click event for cell?
Thanks Don.
"Don Guillett" wrote: To get to the sheet module for this macro, right click sheet tabview codecopy/paste it -- Don Guillett Microsoft MVP Excel SalesAid Software "Rick Rothstein (MVP - VB)" wrote in message ... You would use the BeforeDoubleClick event of the worksheet and use the Target argument (cell double clicked is passed into the event procedure via this argument) to filter on the cell you are interested in. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) If Target.Address = "$C$8" Then ' ' Cell C8 was double clicked ' Put your code for it here ' End If End Sub Note: Double clicking a cell usually puts Excel into edit mode within that cell. If you don't want that to happen, set the Cancel argument to True. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) If Target.Address = "$C$8" Then Cancel = True ' ' Cell C8 was double clicked ' Put your code for it here ' End If End Sub Rick "Ayo" wrote in message ... I am looking for a function that would perform a set of actions when I double click a cell in a worksheet. I know there is something like this in Access. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Double click to navigate to a cell | Excel Discussion (Misc queries) | |||
Click on graph bar to execute a double-click in a pivot table cell | Charts and Charting in Excel | |||
Double click in a Cell | Excel Discussion (Misc queries) | |||
double click a cell and add 1 to that cess | Excel Discussion (Misc queries) | |||
how to copy on double-click the cell value to Clipboard | New Users to Excel |