Create a program that allows the user to enter a number of values. After Values have been entered put up message box for(not using an array here user imputs)
- Highest Value
- Lowest Value
Here's where I am so far
lowest = Val (InputBox("Enter number"))
highest = Val(inputBox("Enter number"))
for i = 1 To 2
Value = Val(InputBox("Enter number"))
if Value < lowest Then
lowest = value
Else
If Value > lowest Then
highest = value
End if
End if
Next i
MsgBox lowest
MsgBox highest
End Sub
I have tried making a number of changes to the code but keep running into the same problem. It reports the lowest values correctly but only reports the highest values correctly if it is the first enter value.
Bonus would be having labels on textboxes.
Ran individually I can find the highest or lowest of entered values
I have tried a few different things with the same result or returning a blank box for highest.