<-- Previous || Up || Next -->

Remove Function
List Class

Public Function Remove( _
      ByVal vValue As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Boolean

Remove a Value from the List given the Value.
Function returns True if the Value was found and removed.
Function returns False otherwise.

       Dim lstTemp As New List
       lstTemp.Add "FunctionName"
       lstTemp.Add "PropertyName"
    for example
       lstTemp.Remove("FunctionName") = True
       lstTemp.Remove("SubName") = False
See also:
    Remove Function
    RemoveAll Subroutine
    Lookup Function
    Add Subroutine
vValue: The Value that will be removed from the List. vValue can be any type of Variant value on which comparisons can be made using the EqualLikeDataTypeFast function (vbString, numeric, vbDate, etc.).
vCompare: Specifies the type of string comparison used to determine if Names match. vCompare defaults to the value of the Compare Property if it is missing.
Note: If there are multiple List entries with the same Value, this function will remove one of them.
v2.0 Change: Changed the vCompare argument so that it can no longer be Null or non-numeric. It is still Optional though, so it can be missing.

v1.1 BugFix: Fixed a bug in this function that caused it to not work in all cases.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.