Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

VS 2010 Loop Help

$
0
0
I am new student. Just trying to have user enter 10 values that display in listbox. What is wrong with inValue = InputBox("Enter a number.")

Code:

Private Sub btnInputValues_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInputValues.Click
Dim inValue(9) As Integer
Dim I As Integer

I = 0
Try
inValue = InputBox("Enter a number.")
For I = 0 To 9
lstValues.Items.Add(inValue)
Next
Catch ex As Exception
MessageBox.Show("Please Enter a valid number.")
End Try


Viewing all articles
Browse latest Browse all 42225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>