Hi!! I am EXTREMELY knew to Visual Basic. (You will be able to tell shortly!) I needed a computer programming class for school and my advisors put me into a class that uses Visual Basic! Ive been struggling!! My latest assignment is........
-Write a program to request positive numbers one at a time from the user in an input dialog box. The user should be instructed to enter -1 after all the positive numbers have been supplied. At that time, the program should display the sum of the numbers.
Here is my code so far...
Public Class frmSF
Private Sub btnSF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSF.Click
Dim response As Integer
response = CInt(InputBox("Enter a couple positive numbers than enter -1."))
Do While (response > 0)
response = CInt(InputBox("Enter a couple positive numbers than enter -1."))
Loop
lstBox.Items.Clear()
End Sub
End Class
I am able to get input boxes, but I do not know how to get the sum of the numbers that I have already entered.. Can some one PLEASE help me!