assign macro

N

nowfal

is it possible to assign a macro on a cell itself , i mean if i a
entering to the particular cell with keyboard enter button the macr
should work. i am getting lot of help from this forum i hope to ge
this also
 
A

Alan

With this code in the VBA Worksheet

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
Your Macro 'Insert your macro name here, the code itself
End If
Application.EnableEvents = True
End Sub

Your macro will trigger when a value is entered into A1
Regards,
 
Top