Get parameters to create existing chart

  • Thread starter Thread starter Matt Williamson
  • Start date Start date
M

Matt Williamson

I'm looking for a way to get all of the paramters used for creating a chart
so I can do it dynamically. Someone else created a fairly complicated chart
and I'd like to be able to re-create it in code so I can change the data
range and title but I'm not sure how. It's complicated enough that I haven't
been able to re-create it manually yet (so I can just record it and get the
params that way) I've been reading all of the dynamic chart code in the MS
KB and various websites, but I haven't found any code to document an
existing chart to create it dynamically.

TIA

Matt
 
Essentially you have to find all of the properties for all of the elements
in the chart. It's not really hard, but it's intricate and tedious work. I
am in the process of quoting on such a utility, which may eventually become
a commercial product.

- Jon
 
Essentially you have to find all of the properties for all of the elements
in the chart. It's not really hard, but it's intricate and tedious work. I
am in the process of quoting on such a utility, which may eventually
become a commercial product.

Thanks John. I took a little time yesterday to play with the object model,
so I know what has to be done now. I was just hoping someone else had
already done it ;) I'm kind of in a time crunch and have 8 other projects
I'm actively working on so I don't really have time to write the code. I've
worked around it by clearing the data range, the title and a text box on the
chart and using it as a template. Then I just fill in those values when I
create new copies of the workbook in code. Not as elegant as creating the
whole thing from scratch, but it'll get me by for now.
 
Actually, for most cases, creating and applying a custom chart type should
be adequate. In my case, I've hosed the Office installation, and my custom
user gallery is corrupted.

- Jon
 

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

Back
Top