hey... can anyone tell me how to make a program that can draw a graph using vb? i am doing a program that is supposed to calculated datas base on an equation and then show the results on a graph. something like an experiment.
thanx anyway. :)
Printable View
hey... can anyone tell me how to make a program that can draw a graph using vb? i am doing a program that is supposed to calculated datas base on an equation and then show the results on a graph. something like an experiment.
thanx anyway. :)
sorry to jump into your post but I've toyed with that idea myself. Well, I got bored with it before I got frustrated.
Anyway, follow this link for a good idea of how to get started.
http://www.planetsourcecode.com/xq/A...s/ShowCode.htm
good luck
the MS Chart control does graphs almost exclusively.
Hi you can draw a graph with Excel using an OLE control.
You will need to place an OLE on your form then link it to an Excel chart. Go into the chart and define the blank cells that the chart will be drawn on - just like in Excell.
then define the variables
Set graf = Me![OLE1].object.Charts("Chart1")
Set shet = Me![OLE1].object.Sheets("Sheet1")
To setup the OLE:
With OLE2
.Format = "CF_TEXT"
.SizeMode = vbOLESizeStretch
End With
To define the chart type:
graf.ChartType = xlXYScatterLines
To define the title and label of axes
graf.ChartWizard _
Title:="TITLE OF GRAPH", HasLegend:=False, CategoryTitle:="X AXIS", ValueTitle:="Y AXIS"
To set a value:
she.Cells(X, Y).Value = VALUE
For more information see excel macro help.
hey.. thanx anyway..
this is my first time i am using this msg thing..
never expect it to have so much reply!!!
i am overwhelm!
thanx!!!