first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

VB Code: Populating the ListBox Control

Public Sub basPopLstBox(ByRef LstBox As ListBox, _ ByVal vArrayOrCollection As Variant) ' 'This sub takes the Items in a Collection (or the 'elements in an array) and adds them to a ListBox 'control. Of course we assume that vArrayOrCollection 'contains string values. ' Dim v As Variant

LstBox.Clear

For Each v In vArrayOrCollection
    
    With LstBox
        .AddItem (VBA.CStr(v))
        .Refresh
    End With

Next

End Sub

mod date: 1999-04-25T05:01:59.000Z