ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Doubleclick (https://www.excelbanter.com/excel-programming/399194-doubleclick.html)

smandula

Doubleclick
 
Is it possible to use two DoubleClick's same programme?
Probably, not.

Is there a work around?


Jim Cone

Doubleclick
 

Something like this?...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Target.Column = 2 Then
Cancel = True
MsgBox "Add more salt"
ElseIf Target.Column = 5 Then
Cancel = True
MsgBox "Pour on the Ketchup"
End If
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"smandula"
wrote in message
Is it possible to use two DoubleClick's same programme?
Probably, not.
Is there a work around?


smandula

Doubleclick
 

Thanks Jim,

Your Solution works.
However, the target value resides in the same column,
from which a Draw Line goes both left and right up the rows
moving one column over each time.

I went back to the Command Button setup, which means
Click the cell, Click the Button.

DoubleClick would have eliminated one step.

However, exercise is Good.

With Thanks


JW[_2_]

Doubleclick
 
On Oct 11, 8:42 pm, smandula wrote:
Thanks Jim,

Your Solution works.
However, the target value resides in the same column,
from which a Draw Line goes both left and right up the rows
moving one column over each time.

I went back to the Command Button setup, which means
Click the cell, Click the Button.

DoubleClick would have eliminated one step.

However, exercise is Good.

With Thanks


Not sure what your criteria is, but you could so something like:
If Target.Text = "Fred" Then
MsgBox "Flinstone"
ElseIf Target.Text = "Barney" Then
MsgBox "Rubble"
End If

Of course, if you have many conditions, a Case statement would be
preferred.



All times are GMT +1. The time now is 04:32 PM.

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