0% found this document useful (0 votes)
29 views3 pages

Programa en Visual Basic Promedios: Form1 Object Eventargs

This Visual Basic program calculates the average of values entered into text boxes. It defines arrays to store the values from different sets of text boxes. When the button is clicked, it loops through each array, sums the values, and calculates the average, displaying the results in separate text boxes. This allows the user to easily calculate averages of multiple data sets entered into the text boxes.

Uploaded by

Dany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Programa en Visual Basic Promedios: Form1 Object Eventargs

This Visual Basic program calculates the average of values entered into text boxes. It defines arrays to store the values from different sets of text boxes. When the button is clicked, it loops through each array, sums the values, and calculates the average, displaying the results in separate text boxes. This allows the user to easily calculate averages of multiple data sets entered into the text boxes.

Uploaded by

Dany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Programa en visual basic

PROMEDIOS
Public Class Form1

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox1.TextChanged

End Sub

Private Sub TextBox11_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox11.TextChanged

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim vec = {TextBox1, TextBox2, TextBox3, TextBox4, TextBox5, TextBox6,
TextBox7, TextBox8, TextBox9, TextBox10, TextBox11, TextBox12, TextBox13, TextBox14,
TextBox15}
Dim vec2 = {TextBox16, TextBox17, TextBox18, TextBox19, TextBox20,
TextBox21, TextBox22, TextBox23, TextBox24, TextBox25, TextBox26, TextBox27,
TextBox28, TextBox29, TextBox30}
Dim vec3 = {TextBox31, TextBox32, TextBox33, TextBox34, TextBox35,
TextBox36, TextBox37, TextBox38, TextBox39, TextBox40, TextBox41, TextBox42,
TextBox43, TextBox44, TextBox45}
Dim vec4 = {TextBox46, TextBox47, TextBox48, TextBox49, TextBox50,
TextBox51, TextBox52, TextBox53, TextBox54, TextBox55, TextBox56, TextBox57,
TextBox58, TextBox59, TextBox60}
Dim vector(15), vector2(15), vector3(15), vector4(15), j, k, l, h, acum,
acum2, acum3, acum4 As Integer
For j = 0 To 14
vector(j) = vec(j).Text
Next
For j = 0 To 14
acum = acum + vector(j)
Next
TextBox61.Text = acum / 15
For k = 0 To 14
vector2(k) = vec2(k).Text
Next
For k = 0 To 14
acum2 = acum2 + vector2(k)
Next
TextBox62.Text = acum2 / 15
For l = 0 To 14
vector3(l) = vec3(l).Text
Next
For l = 0 To 14
acum3 = acum3 + vector3(l)
Next
TextBox63.Text = acum3 / 15
End Sub

Private Sub Label16_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Label16.Click
End Sub

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles


MyBase.Load

End Sub
End Class

You might also like