View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Graham Graham is offline
external usenet poster
 
Posts: 155
Default Reposition Chart Macro

Hi

I am trying to automate a particularly mundane task.

I have a running 6 months of charts on each page repeated for 15 different
criteria.
Currenlty I have to delete the oldest and reposition the remainder to free
up space for the latest month's chart.

I have recorded a macro which reflects this task but obviously needs to be
modified as it selects specific charts.

Can the following code be amended to select charts by their position on the
page?

ActiveSheet.ChartObjects("Chart 21").Activate
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Selection.Delete
ActiveSheet.ChartObjects("Chart 44").Activate
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("Copy of Insurer MI Report v1.06.xls").Activate
ActiveSheet.Shapes.Range(Array("Chart 44", "Chart 61")).Select
Selection.ShapeRange.IncrementLeft -336#
ActiveSheet.ChartObjects("Chart 76").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 76").IncrementLeft 670.5
ActiveSheet.Shapes("Chart 76").IncrementTop -331.5

Any suggestions would be very much appreciated