View Single Post
  #2  
Old February 1st, 2006, 06:37 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default Referencing chart sheets in vba

Never mind. i figured it out. You have to use the CHARTS property.

"The Big Smelly Ogre" wrote:

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?