PDA

View Full Version : Macro to identify selected point in Excel chart



stergio
11-22-2016, 01:05 AM
Hi all,
I have an Excel sheet with a scatter XY chart.

What I would like to do is to "interact" with the chart by clicking (actually every kind of interaction would be good for me: double click, SHIFT + clik, etc.).
In particular I would need a VBA macro that identifies the clicked point.


I have found the attached file in an old thread. Using this code I can do exactly what I want, but I would like to understand better how it works. Can anybody help me?

Which part of code does what? What is a chart event? How do I use it?
How can the file work by just clicking on a chart? Is there a macro "running in background", or does it activate when I click on a chart?

I would like to understand better this kind of things, in order to be able to fully understand and customize the macros.

Thanks a lot!


17660