On Mar 19, 11:44 am, sc <s...@discussions.microsoft.com> wrote:
> I am running excel 2002. I have a sheet with cell f5 active. This is the
> only cell the user is allowed to type in or select. Is there a way to make
> my vba code execute when the user presses the enter key?
>
> Thanks
> sc
Add a Worksheet_Change event to the worksheet code.
Chip Pearson has an excellent guide for beginners.
http://www.cpearson.com/excel/events.htm
But basically,
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$F$5" Then
'run your code here
End If
End Sub