VB Chart > Excel

J

James

I have a vb program that pulls data from a database and displays it
onscreen. This includes a chart - is there a quick way of bascially copying
this chart into an excel spreadsheet via code from my program? I have
already got my listboxes and so on to fill in their info onto a new blank
sheet, but the chart is also going to be handy.
I assume one way is to copy all the data from the chart to a hidden sheet
and use that maybe, but I am hoping I can do something simpler...
Ta,
James.
 
J

Jon Peltier

James -

Make a template that has some dummy data and the chart you like, already
formatted. Create a new file based on the template, not a completely
blank one, overwrite the data, and reset the chart data ranges (or use
dynamic ranges). If you want this in an existing workbook, copy the new
sheet from the new file into the workbook.

- 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

Top