Results 1 to 3 of 3

Thread: select only element in combobox [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    select only element in combobox [Resolved]

    I only have one item in a combobox (initially), and I'd like to select that and make it the "combobox.Text" value... how do you do that?

    VB Code:
    1. If cboMonth(0).ListCount = 1 Then
    2.     cboMonth(0).Text = cboMonth(0).ListCount(0)
    3.     End If

    Something like that, but you can't reference the elements with ListCount...
    Last edited by ober0330; Sep 12th, 2002 at 02:23 PM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    cboMonth(0).Text = cboMonth(0).List(0)

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. If cboMonth(0).ListCount = 1 Then
    2.     cboMonth(0).ListIndex = 0
    3. End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width