Código:
function GetMax(param_arr)
Dim endLoop, maxValue
endLoop = UBound(param_arr) - 1
maxValue = 0
for i=0 to endLoop
if param_arr(i) > param_arr(i+1) and param_arr(i) => maxValue then
maxValue = param_arr(i)
elseif arr(i + 1) > maxValue then
maxValue = param_arr(i+1)
end if
next
GetMax = maxValue
end function
Así se llama:
Dim arr(4)
arr(0) = 50392
arr(1) = 239023
arr(2) = 493
arr(3) = 4892
arr(4) = 4095
Response.Write(GetMax(arr)) ' Devuelve 239023
Espero que sea útil.
Saludos!.