Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Is There A "Choose Cell " Event?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Is There A "Choose Cell " Event?

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


"Minitman" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Is There A "Choose Cell " Event?

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



On Tue, 4 May 2004 22:08:00 -0700, "Tim Zych"
wrote:

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


"Minitman" wrote in message
.. .
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Is There A "Choose Cell " Event?

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)

"Minitman" wrote in message
...
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



On Tue, 4 May 2004 22:08:00 -0700, "Tim Zych"
wrote:

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


"Minitman" wrote in message
.. .
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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Is There A "Choose Cell " Event?

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



On Wed, 5 May 2004 09:13:52 +0100, "Bob Phillips"
wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Can the user "Choose" the path via a VBA command? Brad Patterson Excel Programming 3 August 15th 03 04:24 PM
Is there a "cell change" event? Mark Smith Excel Programming 1 July 11th 03 01:52 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"