Macro running automaticly

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I want a macro to run automaticly when I put information into a cell from a
drop down box. How would this be done.

cell("B9") = 4065~~~> I want this to be filled in by the user and as soon as
they leave this cell the macro "Populate Graph" starts running

Can this be done?

Eric
 
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$B$9" And Target.Value = 4065 Then
MsgBox "Call Populate Graph" 'for testing only
End If
stoppit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP
 

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

Similar Threads


Back
Top