moving charts

T

tracktraining

Hi All,

I am creating a lot of graphs and I would like to know how to move each
graphs. So my code generates a lot of graphs at once and all the graphs are
on top of each other. So I would like to know how to make them display at
different location on the screen. I have the following code idea, but of
course it doesn't work. =( please help!


Sub moveAllCharts()

Dim num1 As Integer
Dim num2 As Integer
Dim cht_num As String
num1 = 184
num2 = 108

For i = 1 To ActiveSheet.ChartObjects.Count
ActiveSheet.ChartObjects(i).Activate
ActiveChart.ChartArea.Select
ActiveChart.Shapes("Chart i").IncrementLeft num1
ActiveChart.Shapes("Chart i").IncrementTop num2
num1 = num1 + 50
num2 = num1 + 50
Next i

End Sub

thanks so much in advance!
tracktraining
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top