Is There A "Choose Cell " Event?

M

Minitman

Greetings,

Is there any way to trigger an event by simply moving the cursor to a
particular cell? If so, how many ways are there to trigger an event
in this fashion?

For example, The cell in question can be A10. The event to be
triggered is to open UserForm1. I

It is easy using Command Buttons, but I am looking for alternatives.

Any one have any ideas?

TIA

-Minitman
 
T

Tim Zych

There is the Selection_Change event of the worksheet. The BeforeDoubleClick
event is a nice(er) alternative.

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Not Application.Intersect( _
Target, Range("A10")) Is Nothing Then
Cancel = True
MsgBox "double-clicked " & Target.Address
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect( _
Target, Range("A10")) Is Nothing Then
MsgBox "selected " & Target.Address
End If
End Sub
 
M

Minitman

Hey Tim,

Cool!

The double click works great - Thanks

I am using a Worksheet_Change event for another project and am not
sure if there will be any interactions.

But this double click works real well.

-Minitman
 
B

Bob Phillips

Double-Click is not very nice, why not use SelectionChange?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

Minitman

Hey Bob,

Why you ask? Because I made some incorrect assumptions and didn't try
it. After your post, I did try it. You are correct, it is exactly
what I was asking for and works as well as I had hoped for (sigh -
when will I ever learn the meaning of the word ass u me)

Thanks for the added vote for SelectionChange

-Minitman
 
Top