Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create xls, and graph in VB

Status
Not open for further replies.

gbfell

Programmer
Dec 11, 2001
27
0
0
US
How can i create an xls file, then graph it in a VB form. how can i do this? i tried using a webbrowser, but don't seem to be able to graph it. i want to graph a numeric column vs a time column (i have both recorded in an access db). the amount of records will change each time i graph it.
 
Have you tried the MS Chart Control? Let me know if this helps

If you are worried about posting, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Have you tried using the ChartWizard method. Try using the following code after you enter the values in the excel spreadsheet.

xlsApp.Charts.Add
xlsApp.ActiveChart.ChartWizard
xlsApp.ActiveChart.ChartType = xl3DPie

 
Sorry, I forgot to mention that you have to select the range of cells to be used in the chart before using the ChartWizard method.
Example:
xlsApp.Range("A3:A6", "B3:B6").Select
 
gbfell:

How did you get on?
Were any of the answers any good for you?
Did you solve it another way?

When we have taken time and trouble to respond, it's nice to know if it was useful! Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
I haven't had a chance yet, but i think it looks like it will work. i'll post more later. thanks guys (and girls :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top