ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programming double click functionality (https://www.excelbanter.com/excel-programming/301883-programming-double-click-functionality.html)

Cyberindio

Programming double click functionality
 
I have a form in Excel my boss wants to use in a presentation. The form has two main tables and he wants to double click on a line item in one table and have it transfer to the other table and vise-versa. Is there some way to program that kind of function to a double click? In the visual basic editor, maybe? How else could I do accomplish the same thing and make my boss happy?
--
cyberindio

Ron de Bruin

Programming double click functionality
 
Hi Cyberindio

You can use this event in the Sheet module

This is working for column A and B

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 1 Then
Target.Offset(0, 1).Value = Target.Value
End If
If Target.Column = 2 Then
Target.Offset(0, -1).Value = Target.Value
End If
End Sub




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


"Cyberindio" wrote in message ...
I have a form in Excel my boss wants to use in a presentation. The form has two main tables and he wants to double click on a line

item in one table and have it transfer to the other table and vise-versa. Is there some way to program that kind of function to a
double click? In the visual basic editor, maybe? How else could I do accomplish the same thing and make my boss happy?
--
cyberindio





All times are GMT +1. The time now is 01:22 PM.

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