+ Reply to Thread
Results 1 to 3 of 3

additem to combobox with an array

  1. #1
    Registered User
    Join Date
    09-14-2003
    Location
    sweden
    Posts
    25

    additem to combobox with an array

    hi, i'm trying to add itemns to an multicolumn combobox (3 columns), using an array.
    if i just try to add 1 column there is no problems, but when i try to add more columns to the combobox it wont work anymore.

    tips anyone?

    tia jocke

  2. #2
    Dave Peterson
    Guest

    Re: additem to combobox with an array

    Did you change the .columncount property?

    I made a small userform and picked up some values off a worksheet to create the
    array and this worked for me:

    Option Explicit
    Private Sub CommandButton1_Click()
    Unload Me
    End Sub
    Private Sub UserForm_Initialize()
    Dim myArr As Variant
    myArr = Worksheets("sheet1").Range("a1:e10").Value
    With Me.ComboBox1
    .ColumnCount = 5
    .List = myArr
    End With
    End Sub



    jocke wrote:
    >
    > hi, i'm trying to add itemns to an multicolumn combobox (3 columns),
    > using an array.
    > if i just try to add 1 column there is no problems, but when i try to
    > add more columns to the combobox it wont work anymore.
    >
    > tips anyone?
    >
    > tia jocke
    >
    > --
    > jocke
    > ------------------------------------------------------------------------
    > jocke's Profile: http://www.excelforum.com/member.php...nfo&userid=766
    > View this thread: http://www.excelforum.com/showthread...hreadid=471671


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    09-14-2003
    Location
    sweden
    Posts
    25

    yes!

    finally, now it works.
    i've tried with "additem" like a hundred different ways, never heard about the "list"command.

    thanks a lot

    /jocke

+ Reply to Thread

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