-----Original Message-----
Paste the function below into a module.
On your form, set the 11th text box's ControlSource to:
=Largest([Text1], [Text2], ..., [Text10])
Function Largest(ParamArray varValues()) As Variant
Dim i As Integer 'Loop controller.
Dim varMax As Variant 'Largest value found so far.
varMax = Null 'Initialize to null
For i = LBound(varValues) To UBound(varValues)
If IsNumeric(varValues(i)) Then
If varMax >= varValues(i) Then
'do nothing
Else
varMax = varValues(i)
End If
End If
Next
Largest = varMax
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
I have 10 Text boxes with time values.
Where is possible any Text box without time value.
In 11th Text box I need formulae to display MAX value
between those Text boxes.
Thanks in advance.
an
.