Results 1 to 1 of 1

Referencing the nth member of a combobox

Threaded View

Shonucic Referencing the nth member of... 01-31-2012, 09:30 AM
  1. #1
    Registered User
    Join Date
    01-25-2012
    Location
    Nashville, Tennessee
    MS-Off Ver
    Excel 2007
    Posts
    2

    Referencing the nth member of a combobox

    Lets say I have 5 items added to a combobox named CBOBOX and these items are Jim, Kelly, Laura, Dave, and Jenny. Is there a way to reference the 1st, 2nd, 3rd, etc members of that combobox.

    More specifically what I want to do is run a for next loop that will find run a match function down column A and return the row numbers of the items in my combobox.

    Something like this:

    Sub ComboRow()
    Dim RowNumber as Integer
    Dim Name as String
    
    For i = 1 to 5 step 1
    Name = Userform1.CBOBOX.[something that references combobox members](i)
    RowNumber = application.match(Name, Range("A1:A100"), 0)
    
    [do some calculations with row number]
    
    next i
    
    end sub

    Any help is appreciated





    [Edit: I found the solution. Userform1.CBOBOX.Column(0,i) is the answer.]
    Last edited by Shonucic; 01-31-2012 at 09:53 AM. Reason: Solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1