Move all charts

I am using the below code to move all the charts from one sheet to a new sheet called Summary.  The problem I am having it is pasting the charts starting at H36 and I would like it to be A1.  

Sub MoveAllCharts()
   Dim ChartObj As Object
   Application.Run "Add_Sheet"
   ActiveSheet.Next.Select
   For Each ChartObj In ActiveSheet.ChartObjects
      ChartObj.Chart.Location xlLocationAsObject, "Summary"
   Next ChartObj
End Sub
Sub Add_Sheet()
    Sheets.Add Before:=ActiveSheet
    ActiveSheet.Name = "Summary"
End Sub

Open in new window

Thanks,
Montrof
LVL 1
montrofAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Use this code...

Sub MoveAllCharts()
   Dim ChartObj As ChartObject
   Application.Run "Add_Sheet"
   ActiveSheet.Next.Select
   For Each ChartObj In ActiveSheet.ChartObjects
      ChartObj.Chart.Location xlLocationAsObject, "Summary"
      ChartObj.Left = Sheets("Summary").Range("A1")
      ChartObj.Top = Sheets("Summary").Range("A1")
   Next ChartObj
End Sub
Sub Add_Sheet()
    Sheets.Add Before:=ActiveSheet
    ActiveSheet.Name = "Summary"
End Sub

Open in new window


Saurabh...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
montrofAuthor Commented:
Thank you
Montrof
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.