Function Stack Class

Pick

Pushes a copy of the Nth element from the top of the stack. Function returns True upon success and False upon failure.

Signature (Visual Basic / VBA)

Public Function Pick( _
      ByVal vNthElem As Long _
    ) As Boolean

Code Example

    Assuming
       stkTemp.StringView() = "(Top) 4444, 333, 22, 1 (Bottom)"
    for example
       stkTemp.Pick(2) = True
    leaves
       stkTemp.StringView() = "(Top) 333, 4444, 333, 22, 1 (Bottom)"

Notes & Version History

vElement Number of the item whose value should pushed onto the top of the stack. vElement must be between 1 and Count otherwise this function does nothing and returns False.
v1.3 BugFix This Function has been fixed to support the storage of Object and DataObject type Values.