Function List Class

RemoveByNumber

Remove a Value from the List given its position within the List . Function returns True if the position number was valid and the Value was removed. Function returns False otherwise.

Signature (Visual Basic / VBA)

Public Function RemoveByNumber( _
    ByVal vElement As Long _
    ) As Boolean

Code Example

    Assuming
       Dim lstTemp As New List
       lstTemp.Add "FunctionName"
       lstTemp.Add "PropertyName"
    for example
       lstTemp.RemoveByNumber(2) = True
       lstTemp.RemoveByNumber(2) = False

Parameters

Parameter Description
vElement Position within the List of the Value to be removed. vElement must be between 1 and Count or this function will do nothing but return False.