Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jocke
 
Posts: n/a
Default 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


--
jocke
------------------------------------------------------------------------
jocke's Profile: http://www.excelforum.com/member.php...nfo&userid=766
View this thread: http://www.excelforum.com/showthread...hreadid=471671

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

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   Report Post  
jocke
 
Posts: n/a
Default


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

thanks a lot

/jocke


--
jocke
------------------------------------------------------------------------
jocke's Profile: http://www.excelforum.com/member.php...nfo&userid=766
View this thread: http://www.excelforum.com/showthread...hreadid=471671

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel array formulas Les Gordon Excel Discussion (Misc queries) 1 September 3rd 05 04:12 PM
Newbie combobox ordeal. alex.k New Users to Excel 6 July 3rd 05 11:29 PM
Pass an array to Rank Biff Excel Worksheet Functions 12 June 29th 05 04:15 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"