Getting all text in a combo box

How can I get every entry in a combobox and put it into a string or something? Failing that, how can I get one entry at a time and put just that into a string? Seems like it should be so simple.

Comments

  • : How can I get every entry in a combobox and put it into a string or something? Failing that, how can I get one entry at a time and put just that into a string? Seems like it should be so simple.
    :

    My computer is across the country right now but i do believe combo boxes have an index property, so try something like this:

    [code]
    Sub GetComboEntries()
    Dim nTimes As Integer, sValue As String
    For nTimes = 0 To cmbEntries.IndexCount
    If sValue <> "" Then
    sValue = sValue & "; " & cmbEntries.Index (nTimes)
    Else
    sValue = cmbEntries.Index (0)
    End If
    Next nTimes
    End Sub
    [/code]
    I really hope that works for you man.
    [code]
    ..: Zantos :..
    MegaRiot Productions
    http://www.megariot.funurl.com
    [/code]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion