ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   double click and move over (https://www.excelbanter.com/excel-programming/342232-double-click-move-over.html)

Mark Kubicki

double click and move over
 
what would be the code to do something when the user double clicks a cell,
and THEN MOVE THE SELECTION TO THE NEXT CELL (left or down...t.b.d.) -as
part of the function

i got the do something on double click
but not the "exit that cell and go somewhere else" part
....(the function gets hung-up in edit mode)

....thanks in advance
-mark



Ron de Bruin

double click and move over
 
Use this event in the sheet module

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Target.Offset(0, 1).Select
End Sub

See the help for Offset

--
Regards Ron de Bruin
http://www.rondebruin.nl


"mark kubicki" wrote in message ...
what would be the code to do something when the user double clicks a cell,
and THEN MOVE THE SELECTION TO THE NEXT CELL (left or down...t.b.d.) -as
part of the function

i got the do something on double click
but not the "exit that cell and go somewhere else" part
...(the function gets hung-up in edit mode)

...thanks in advance
-mark






All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com