Posted by Mohammad Rahhal, Last modified by Salameh Abu Hashish on 12 December 2018 02:29 PM


Public Function ArrayMaximum(ary As Variant, start As IntegerOptional Count As Integer = -1) As Integer

This function is used to get the maximum number in a numeric array from a specific given start position.


Key Description 
ary   Array to get the max value, value of type Variant.
start Index to start checking max number, a value of type Integer.
Count Number of search elements, by default searches all array,value of type Integer.

Return value

Returns the maximum value in the selected array as Integer. In case of failure, returns -1.


 Public Sub main ()

 Dim Arr

 CopyHigh 0, 10, 20, Arr

 Dim Result

 Result = ArrayMaximum (Arr,1,-1)

 AlertMessage (Result) ‘Returns the maximum number at Arr

 End sub

See Also

Back to VTL Client Script Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions