0% found this document useful (0 votes)
6 views2 pages

Visual Basic Form Data Input and Processing

The document contains code for a form with buttons that allow a user to: 1) Input values for variables A and B which are added to listboxes. 2) Remove selected items from the listboxes. 3) Multiply the values of A and B in each listbox and add the results to a third listbox. 4) Clear all textboxes and listboxes.

Uploaded by

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

Visual Basic Form Data Input and Processing

The document contains code for a form with buttons that allow a user to: 1) Input values for variables A and B which are added to listboxes. 2) Remove selected items from the listboxes. 3) Multiply the values of A and B in each listbox and add the results to a third listbox. 4) Clear all textboxes and listboxes.

Uploaded by

jose isaac
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Public Class Form1

Dim A As Single
Dim B As Single
Dim C As Single
Dim n As Integer
Dim ndato As Integer
Dim i As Integer
Private Sub Button1_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
ndato = Val([Link])
For i As Integer = 0 To ndato - 1
A = InputBox("ingrese valor de A", i)
[Link](A)
[Link] = [Link]

B = InputBox("ingrese valor de B", i)


[Link](B)
[Link] = [Link]

Next i
End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link]([Link]())
For i As Integer = 0 To [Link]() - 1
A = 0
A = Val([Link](i))
Next i
[Link]([Link]())
For i As Integer = 0 To [Link]() - 1
B = 0
B = Val([Link](i))
Next i
End Sub

Private Sub Button3_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
A = [Link]
For i As Integer = 0 To A - 1
A = Val([Link](i))
B = Val([Link](i))
C = A * B
[Link](C)
[Link] = [Link]
Next i
End Sub

Private Sub Button5_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
End
End Sub

Private Sub Button4_Click_1(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link]()
[Link]()
[Link]()
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub
End Class

You might also like