Create Bar chart Pie chart using visual programming Lab

Friday, May 28, 2010

Procedure: create Form using VB tools five text box.
Create the command Button and write the coding that command button.
In these coding MSchar1.chartData=x it is draw the coding for the specified input value. Create Five Text box for getting the Input and One command button to perform the char creation process.
Output Screen shot chart programming
Bar chart Pie chart MSChart1.ChartData

Source code Visual Programming Lab

Private Sub Command1_Click()
Dim x(1 To 5) As Variant
'Text values
x(1) = Val(Text1.Text)
x(2) = Val(Text2.Text)
x(3) = Val(Text3.Text)
x(4) = Val(Text4.Text)
x(5) = Val(Text5.Text)
'Assign Textvalues to Chart control
MSChart1.ChartData = x MSChart2.ChartData=x
End Sub

0 comments:

Post a Comment