Knowledgebase:
ArrayBSearch
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 12 July 2017 04:05 PM

Syntax

Public Function ArrayBSearch(ary As Variant, value As Variant) As Integer

This function is used to search for a specific value in given array.

Parameters

Key

Description 
ary   Array that want to search the value on it,value of type Variant.
value Value to be searched, Value of type Variant

Return value

Return the index of a found element as Integer value.

Sample

 Public Sub main ()

  Dim Arr (5)

  Arr (1) = 1
  Arr (2) = 2
  Arr (3) = 4
  Arr (4) = 6

  Dim Index

  Index = ArrayBSearch (Arr, 2)
  AlertMessage (Index) ‘returns the index of found element

  End sub


See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
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