• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Chart object made from an already created chart?

tdrose01

New Member
Hi,
I have a question is there anyway to create a chart object from an already existing chart?

Thanks,
tom
 
Hi,

If you mean a copy of existing chart then you just need to select the Chart, press Ctrl+C and Press Ctrl+V

This will create a copy of existing chart with all attributes remaining same i.e. Data Source, Formatting, Chart Type etc. You can certainly change them as per your requirements.

Thanks
 
Hi Tom ,

Since this question is posted in the VBA section , I assume you are asking about the ChartObject object.

The following 2 lines are sufficient :

Dim chto As ChartObject
Set
chto = Me.ChartObjects(1)

In case you have more than one embedded chart in the worksheet , you can use the name of the chart , as in :

Set chto = Me.ChartObjects("Chart 1")

Once you have done this , you can query the chartobject by , for example , the following :

?chto.Name

?chto.Chart.Name

?chto.Chart.ChartType

Narayan
 
Back
Top