Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27569

How to cancel and exit when the user clicked inside inputbox

$
0
0
Is it possible if I didn't change rainfall as string? I need it as integer to put in numbers.
Code:

        Dim rainfall(11) As Integer

        lstInput.Items.Add("Monthly Rainfall Input")
        lstInput.Items.Add("----------------------")

        For i = 0 To 11

            rainfall(i) = CInt(InputBox("Please enter the rainfall for " & Month(i), "Challenge 2 - Rainfall Statistics"))

            lstInput.Items.Add(rainfall(i) & " for " & Month(i))
            total = total + rainfall(i)
            avg = total / 12

        Next

        ' If the user clicks the Cancel button or enters an
        ' empty string, leave this Click handler immediately.
        ' Exit if the user clicks the Cancel button


Viewing all articles
Browse latest Browse all 27569

Trending Articles