Dim strUserInput
Dim IntUserInput As Integer
Dim i As Integer
strUserInput = InputBox("Enter a positive integer value", "Input Needed", 10)
If strUserInput <> String.Empty Then
Try
intUserInput = CInt(strUserInput)
If IntUserInput < 0 Then
MessageBox.Show("Negative numbers are not accepted.")
Exit Sub
End If
'IntUserInput = (IntUserInput + i)
MessageBox.Show("Sum of Numbers", "The sum of numbers" & (i + IntUserInput), MessageBoxButtons.OK)
Catch ex As Exception
MessageBox.Show("Quantity amount must be numeric.")
End Try
'Show messagebox,
Else
MessageBox.Show("Incorrect input", "You must enter a positive integer value", MessageBoxButtons.OK)
Exit Sub
End If
*Always use code blocks please, and put an explanation of your problem in the post not just the title
This post has been edited by PsychoCoder: 10 October 2007 - 12:17 PM

New Topic/Question
Reply




MultiQuote





|