Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible run code when a cell is doubleclicked?
Is it possible run code when a cell is doubleclicked?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible run code when a cell is doubleclicked?
Yes. Suppose you want the code to run if the user clicks on cell B5.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Target.Address = "$B$5" Then 'do something End If End Sub In he VB Editor put this in the worksheet's module. Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible run code when a cell is doubleclicked?
Cool, thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is it possible run code when a cell is doubleclicked?
If Target.Address = "$B$5" Then
'do something End If You probably want to set Cancel = True in this code: If Target.Address = "$B$5" Then 'do something Cancel = True End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "merjet" wrote in message ps.com... Yes. Suppose you want the code to run if the user clicks on cell B5. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Target.Address = "$B$5" Then 'do something End If End Sub In he VB Editor put this in the worksheet's module. Hth, Merjet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
Is it possible run code when a cell is doubleclicked? | Excel Worksheet Functions | |||
UDF code to find specific text in cell comments, then average cell values | Excel Programming |