I have just recently started using VB.net, i'm use to the VB.6 concept of working, The problem i have is farely a simple one, but i can't get it t work. I need to prompt a input box enter an amount, a while loop needs to run addind all amounts entered in to the input box.the while loop must calculate the total amount entered through the input box and output the result in a text box.
I have the following code, tried two methods but both give me a error: they are as follows.
InputBox("Please enter value", "Input Box", p)
poll = CInt(p)
While counter <> poll
counter = counter + 1
test = test + poll
txtamstations.Text() = CStr(test)
InputBox("Please enter value", "Input Box", p)
poll = CInt(p)
End While
Private Sub cmdstation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdstation.Click
poll = CInt(InputBox("Please enter amount"))
While counter <= poll
counter = counter + 1
poll = CInt(InputBox("Please enter amount")) + poll
txtamstations.Text() = CStr(poll)
End While
End Sub
Any help will be much appreciated.
Thankyou
SeanW
[email protected]