Calling a macro from a macro that displays a chart. Once the chart is created, should the user click on the chart it will execute a macro. Sub TestAssignMacro() ' Reference ChartObject by Name ActiveSheet.ChartObjects("Chart 1").OnAction = _ "CopyChartWithRatio" ' ... or reference ChartObject by Index (it's the same) ActiveSheet.ChartObjects(1).OnAction = _ "CopyChartWithRatio" End Sub Sub CopyChartWithRatio() ' When you click Chart, this macro will run MsgBox "Hi from Chart" End Sub
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.