View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Myrna Larson Myrna Larson is offline
external usenet poster
 
Posts: 863
Default Is there a "key-up" type event for a worksheet?

You can find the events available for a worksheet in the object browser.

I believe in this case your code belongs in the WorksheetChange event. That is
triggered when the user changes ANY cell, so you must check for the cell of
interest. Notice also that you have to turn event trapping off before you
clear cells.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$4" Then
Application.EnableEvents = False
Me.Cells(12, 11).Resize(3, 5).Clear
Application.EnableEvents = True
End If
End Sub

On Sun, 6 Mar 2005 18:12:51 -0500, "Grumpy Aero Guy"
wrote:

I would like to use a "key-up" like event to clear certain cells in a
worksheet when someone enters a new input value in another (unrelated) cell.

I know how to program the event I want in terms of VB, but how do I
create/capture an event tied to a single cell on a worksheet??

Maybe it's brain flatulence, but I'm at a dead end here (tired).