Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move an embedded chart on a worksheet to a chart sheet with VBA 2

Status
Not open for further replies.

bacon4life

Electrical
Joined
Feb 4, 2004
Messages
1,543
Location
US

Does anyone know how to move an embedded chartObject from a worksheet to a separate chartsheet with VBA. Manually I would just right click and select move to new sheet but I can't find an equivalent VBA command.

Since it is a chartObject, I can't use Charts.move. Chart.add will create a new chartsheet, but I can't figure out how to move the chart from Sheet1 over to the newly create chartsheet.

Thanks
 
This will work if the chart is active. If not, replace "ActiveChart" with the name of the chart object.

ActiveChart.Location Where:=xlLocationAsNewSheet
 
Have you tried the macro recorder with your operations?

TTFN
faq731-376
7ofakss
 
Thanks, both of those work great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top