Referencing chart sheets in vba

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I asked this question in the programming forum but got no replies, so I'll
try it here.

I'm trying to adapt some code (from Jon Peltier's website) to scale chart
axes based on cell contents. I can get the code to work for charts embedded
in the active worksheet and other worksheets, but I can't figure out how to
reference a chart that is on it's own sheet. How is this done?

Here is the type of code I'm working with:

ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory) _
.MaximumScale = Target.Value

Can anyone help me?
 
Back
Top