MrExcel Publishing
Your One Stop for Excel Tips & Solutions

how run a macro when enter is hit from a certain cell


Posted by mark jeanes on November 07, 2001 2:16 PM

I would like to run a particular macro when enter is hit after data is entered from a certain cell.

The 'onentry' command in VBA appears to apply only a sheet and cannot apply to an individual cell.

Can anyone help please?

Thanks,

Mark Jeanes


Posted by Nandor Hidegkuti on November 07, 2001 2:24 PM


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, [A1]) Is Nothing Then
'Call your macro here
End If
End Sub