I have a macro that creates a chart as a chart sheet from a .csv file. I put the data that I need from the .csv file into a couple arrays.

Now I want to make a smaller chart object in the chart sheet when a series point is clicked on. I can get it to do this just fine by making use of the following:

With ActiveWorkbook.VBProject.VBComponents(ChartName).CodeModule
LineNum = .CountOfLines + 1
.InsertLines LineNum, "Option Explicit" & Chr(10) & _
"Private Sub Chart_MouseDown .... ' etc. with a GetChartElement in there.

My only problem now is that I want the smaller chart to be made based on the arrays that were made in my macro. I've tried just declaring the arrays as Public, but that doesn't seem to work. How do I get the arrays from my macro into the chart module?

Thanks!