View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Matt Williamson Matt Williamson is offline
external usenet poster
 
Posts: 22
Default Get parameters to create existing chart



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.



"Matt Williamson" wrote in message
...
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