Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function GetMaxOfFieldValues(strFieldValues as string) as long
Dim lngMaxSoFar As Long
Dim lngThisValue As Long
Dim intCounter As Integer
lngMaxSoFar = 0
intCounter = 0
arrlngValues = Split(strFieldValues, ";")
Do Until intCounter > UBound(arrlngValues)
lngThisValue = arrlngValues(intCounter)
If lngMaxSoFar < lngThisValue Then lngMaxSoFar = lngThisValue
intCounter = intCounter + 1
Loop
GetMaxOfFieldValues= lngMaxSoFar
end function
'A generic function to get the max value of an arbirtrary numbers of same type values:
Public Function myMax(ParamArray Args())
Dim i As Long, rv
For i = 0 To UBound(Args)
If IsNull(rv) Or rv < Args(i) Then rv = Args(i)
Next
myMax = rv
End Function
You can pass in any number of field values, but take fneily's advice