Doubleclick

  • Thread starter Thread starter smandula
  • Start date Start date
S

smandula

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

Is there a work around?
 
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?
 
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
 
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.
 

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

Back
Top