#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default On entry

Can someone please tell me how to run a macro on striking "enter" after
putting information into a cell?

Barry


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default On entry

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
With Target
'do something
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

RP

"Beeel" wrote in message
...
Can someone please tell me how to run a macro on striking "enter" after
putting information into a cell?

Barry




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
Can I lock a cell after data entry so entry can not be changed Verlinde Excel Discussion (Misc queries) 3 April 22nd 10 07:59 PM
Excel 2002 date entry: Cannot get away from d-m-yy entry format Steve Eklund Excel Discussion (Misc queries) 3 May 11th 09 04:57 PM
Control Data Entry - push entry to next cell Ofelia Excel Discussion (Misc queries) 0 July 7th 08 04:19 PM
Auto entry of data based on entry of text in another column or fie Judy Rose Excel Discussion (Misc queries) 2 May 21st 08 01:14 PM
Cell Entry That Locks Selected Cells From Any Data Entry. ron Excel Worksheet Functions 5 February 16th 07 09:52 PM


All times are GMT +1. The time now is 04:10 PM.

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

About Us

"It's about Microsoft Excel"