I have a Excel Add-in (XLAM file) - this allows me to chart data on any workbook of the type XLSX - however I use a class modules to trap chart events - so when a user clicks on a datapoint in the chart - I want the events to fire - but it require the code below to be embeeded into the sheet in the XLSX workbook - any idea how I from my XLAM code can write that code to the worksheet where the chart resides. All my datasheets used for making the charts are standard XLSX files.
Code:
Dim MyChart As New Class1
Private Sub Worksheet_Activate()
Set MyChart.Ch = ActiveSheet.ChartObjects(1).Chart
End Sub
Last edited: