Originally Posted by
Pianoman23
Thanks. I now have the following:
CODE
Dim textBoxes() As TextBox = {tbAAH, tbCol, tbDE, tbLex, tbUni}
Dim numbers = textBoxes.Where(Function(tb) Integer.TryParse(tb.Text, Nothing)).Select(Function(tb) Integer.Parse(tb.Text))
Dim minNumber = numbers.Min()
CODE
I get the following message:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Core.dll
Additional information: Sequence contains no elements
So presumably something needs to be put in the brackets after Dim minNumber = numbers.Min(); but what should be in there?