VB CODE for double click?

C

CAPTGNVR

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
 
M

Mark Ivey

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
 
M

Mike H

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
 
C

CAPTGNVR

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top