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

Add Or Update Sub
List Class

Public Sub AddOrUpdate( _
      ByVal vValue As Variant _
    , Optional ByVal vCompare As Variant _

Add a new Value to the List unless it already exists.

       Dim lstTemp As New List
    for example
       lstTemp.AddOrUpdate "FunctionName"
       lstTemp.AddOrUpdate "FunctionName"
       lstTemp.Count = 1
See also:
    Add Subroutine
vValue: Value that will inserted into the List unless it already exists (in which case this subroutine will silently do nothing). 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 or Null or cannot be fixed up to a number.

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