![]() |
assigning a macro to chart
Hi all
I have assigned a macro to a chart, (i.e. code executes when chart is clicked)and would like to refer back to the chart that has just been clicked, similar to referring to "ActiveChart", except that in this case the click does not activate the chart. Is this possible, or does one have to assign an individual macro to every chart (and refer to the specific chart)? |
assigning a macro to chart
Claude -
Application.Caller, in the called macro, tells you the name of the chart object. So refer to the chart using activesheet.ChartObjects(Application.Caller) - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services http://PeltierTech.com/Excel/Charts/ _______ Claude wrote: Hi all I have assigned a macro to a chart, (i.e. code executes when chart is clicked)and would like to refer back to the chart that has just been clicked, similar to referring to "ActiveChart", except that in this case the click does not activate the chart. Is this possible, or does one have to assign an individual macro to every chart (and refer to the specific chart)? |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com