Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fill array into multi column combobx (VBA/Word2003)

    Hi,

    I think I've seen this mentioned elsewhere before, but haven't been able to locate info on it.

    Is it possible to put an array(i,j) directly into a multicoulmn control without looping...?

    Think I've seen something like.... (though I'm aware this is not quite right)

    cmbControl.columncount = 2
    cmbControl() = array2dimensional


    TIA
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Fill array into multi column combobx (VBA/Word2003)

    Use the List property:

    cmbControl.List = arr2dimensional

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fill array into multi column combobx (VBA/Word2003)

    Hi Hans,

    Apologies - my code snippet wasn't quite correct.

    I'm using

    cmbControl.list() = arr2Dimension

    I know I can get around this with a 'For Each', but is just hoping that I can solve it with a single line of code instead.
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Fill array into multi column combobx (VBA/Word2003)

    You don't need the parentheses. cmbControl.List = arr2Dimension should work if you have defined arr2Dimension as a two-dimensional array and populated its elements.

    Note: you write array2dimensional first, now arr2Dimension. Make sure that you are using the correct name.

Posting Permissions

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