Determine if a Value/Object Exists in an ANY KIND MULTIDIMENSIONAL ARRAY.

Category:
Lists, Collections and Arrays
Type:
Snippets
Difficulty:
Advanced
Author:
Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This function is very handy for checking whether a Value or Pointer to an Object exists in an ANY MULTIDIMENSIONAL ARRAY. Ordinarily most programmers will use the LBound/UBound values of an array to loop through the array. Handling the multidimensional arrays is even worse and sometimes really painfull. Well here is a very fast way of checking ANY TYPE OF ARRAY for some value.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: