Excel Charts on Windows Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't know if this is doable but I would like to use an Excel chart to
display in a component on a Windows form. I'm using VS 2005. Is there a
technique to do this?
 
I think so. couple of methods to try.

1) Start with coping cells.
Then use Paste Special and select either picture or enhanced picture into
you application.

2) You can create a file by paste special into Power Point as picture. Then
right click the picture and select Save Picture As. You can select a number
of different formats including JPG, WMF, and others.
 
Sorry, I wasn't too clear. I want to create the Excel chart object
programmatically at run time. I have a datagridview that displays a thirty
day trend of an inventory item level and I would like to give the option of
an Excel chart displaying the same numbers graphically. I'm not happy with
the third party charting app that we have and I was wondering if there is a
way to create a chart object and imbed it in a Windows form.
 
Yes you can create a chart using VBA. What I would recommend is using the
record method of generating the VBA code. If the code doesn't work, then
post the code and I will fix it. This is what you should do

1) On worksheet, go to Tool Menu - Macro - Record Macro.
2) Perform the operations you normally do to create chart by using chart
wizard in the insert menu.
3) After chart is generated, go to Tool Menu - Macro - Stop Recording.
4) Run macro and see if it give you the results you are looking for. If not
post the macro and any comments and I will try to solve your problems.
 

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