assign macro

  • Thread starter Thread starter nowfal
  • Start date Start date
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
 
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top