ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB CODE for double click? (https://www.excelbanter.com/excel-programming/409678-vbulletin-code-double-click.html)

CAPTGNVR[_2_]

VB CODE for double click?
 
DEAR ALL

Can someone suggest me a VB code to be placed in sheet event
BeforeDoubleClick so that any cell I double click in colum A, it calls for
macro 'insert_tow'.

If i get this code, I am done for the day as the program is complete with
this.

Pls help.

brgds/captgnvr

Mark Ivey[_2_]

VB CODE for double click?
 
See if this will work....



Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

If Selection.Column = 1 Then
insert_tow ' call your other macro
End If

End Sub


Mark Ivey



"CAPTGNVR" wrote in message
...
DEAR ALL

Can someone suggest me a VB code to be placed in sheet event
BeforeDoubleClick so that any cell I double click in colum A, it calls for
macro 'insert_tow'.

If i get this code, I am done for the day as the program is complete with
this.

Pls help.

brgds/captgnvr



Mike H

VB CODE for double click?
 
Hi,

I wasn't sure if insert_tow was a typo and you want to insert a row so this
can do either just use the line you want

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 1 Then
insert_tow
'Target.EntireRow.Insert
End If
End Sub


Sub insert_tow()
MsgBox "insert_tow running"
End Sub

Mike

"CAPTGNVR" wrote:

DEAR ALL

Can someone suggest me a VB code to be placed in sheet event
BeforeDoubleClick so that any cell I double click in colum A, it calls for
macro 'insert_tow'.

If i get this code, I am done for the day as the program is complete with
this.

Pls help.

brgds/captgnvr


Don Guillett

VB CODE for double click?
 
if target.column<1 then exit sub
target.entirerow.insert

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"CAPTGNVR" wrote in message
...
DEAR ALL

Can someone suggest me a VB code to be placed in sheet event
BeforeDoubleClick so that any cell I double click in colum A, it calls for
macro 'insert_tow'.

If i get this code, I am done for the day as the program is complete with
this.

Pls help.

brgds/captgnvr



CAPTGNVR[_2_]

VB CODE for double click?
 
YES MARK--another BINGO.
your code works fine as I want and todays job is a good satisfaction of
learning a lot.

thank you and brgds/captgnvr

"Mark Ivey" wrote:

See if this will work....



Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

If Selection.Column = 1 Then
insert_tow ' call your other macro
End If

End Sub


Mark Ivey



"CAPTGNVR" wrote in message
...
DEAR ALL

Can someone suggest me a VB code to be placed in sheet event
BeforeDoubleClick so that any cell I double click in colum A, it calls for
macro 'insert_tow'.

If i get this code, I am done for the day as the program is complete with
this.

Pls help.

brgds/captgnvr




All times are GMT +1. The time now is 02:47 PM.

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