ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   moving charts (https://www.excelbanter.com/excel-programming/424839-moving-charts.html)

tracktraining

moving charts
 
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
--
Learning


All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com