Dim i As Integer
Dim lMax As Long
Dim lMin As Long
Dim lTotal As Long
Dim lRetVal As Variant
Dim sMsg As String
Dim bBegin As Boolean
bBegin = True
For i = 1 To 15
Do While (Not IsNumeric(lRetVal) Or bBegin = True) Or InStr(lRetVal, "." > 0
lRetVal = InputBox("Please enter an integer number " & i)
bBegin = False
Loop
If i = 1 Then
lMin = lRetVal
lMax = lRetVal
End If
If lRetVal < lMin Then lMin = lRetVal
If lRetVal > lMax Then lMax = lRetVal
lTotal = lTotal + lRetVal
bBegin = True
lRetVal = ""
Next i
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.