View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Flemming Dahl[_2_] Flemming Dahl[_2_] is offline
external usenet poster
 
Posts: 18
Default KeyDown event in sheet

Hi Peter

No keydown event on sheet - you gotta use Worksheet_Change - e.g. like this

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
MsgBox "Cell A1 has been changed to " & Target.Value
End If
End Sub

Cheers,
Flemming



"Peter Wallin" wrote in message
om...
Hello,
How do I catch the event that occurs when a user presses a key, for
example entering 456 in a cell? I know about application events, but
the events that can be caught using this type of events are limited. I
want to be able to handle other events such as keydown in any sheet in
any workbook. Any suggestions?

Thanks in advance!

peter w.