VB editing -- multiple charts on a chart-page

  • Thread starter Thread starter CycleMark
  • Start date Start date
C

CycleMark

A single chart-sheet can contain multiple independent
charts. However, the VB "Project Explorer" hierarchy
shows only the *first* chart placed on the chart-sheet.
There doesn't appear to be a way to access the second,
third, nth chart on the chart-sheet from within the VB
editor. Does anyone know how to do this?

Subject: Re: precise positioning of objects
From: "Jon Peltier" <[email protected]> Sent:
10/22/2003 11:53:33 AM

You need to use VBA:

' Move and resize selected object
selection.left=5
selection.top=100
selection.height=55
selection.width=40

- Jon
 
Actually, the Project Explorer only lists the chart sheet, not any chart
objects on that sheet. If the chart sheet has a chart, that chart has
no chart object. Chart objects are the containers that hold an embedded
chart on its parent sheet.

The object model works like this. Assume you have only one chart sheet,
so the sheet is ActiveWorkbook.Charts(1). Any chart objects are
referenced by an index: ActiveWorkbook.Charts(1).ChartObjects(1),
ActiveWorkbook.Charts(1).ChartObjects(2), etc.

- Jon
 
Back
Top