action upon selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a cell I2, which is validated to a dropdown list, and everytime
someone selects something from that list, I need a macro to run. Is there
some simple code I can put into the sheet, book, or whatever (2007 Excel),
which accomplished this? I know there were action-triggered macro methods
before, but I was never really certain how they worked. If you do happen to
know how to do this and respond, please assume I'm a novice at this, and help
me understand where specifically I am supposed to be put any code provided.
Will help greatly. Thanks.
 
hi ,

Place code below in your sheet's module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$I$2" Then yourmacro
'noted that macro 'yourmacro' must be exist
End Sub

and "$I$2" is case sensitive
 

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