values.Value = strValues ' Create a array of strings from the input. arrStrValues = Split(strValues, ",") ' Size our new array of integers. ReDim arrIntValues(arrStrValues.GetUpperBound(0)) ' Transfer data from our string array to our int array. ' Otherwise data would be sorted by text so that 100 ' would be less then 90 because 1 is smaller then 9. For I = LBound(arrStrValues) To UBound(arrStrValues) If IsNumeric(arrStrValues(I)) Then arrIntValues(I) = CInt(arrStrValues(I)) End If Next ' Pass integer arrays to the sorting functions. litMin.Text = Min(arrIntValues) litMax.Text = Max(arrIntValues)