PC Review


Reply
Thread Tools Rate Thread

Combobox Row Source

 
 
Martin
Guest
Posts: n/a
 
      5th Jun 2008
I have a combobox on a userform that has a Row Source of 3 columns and about
200 rows. I can get everything to work but the combobox will only display
the entry from the first column of the source. I would like it to display
the second column.

I have tried changing the Bound Column to 2. In fact, I have changed it to
0, 1, 2, and 3 and the combobox always displays column 1 information.

I can get it to work by shifting the columns around in my source data, but I
would like to avoid that if at all possible.

I am running Excel 2002.

Does anyone have any suggestions?

Thanks.

 
Reply With Quote
 
 
 
 
Smallweed
Guest
Posts: n/a
 
      5th Jun 2008

You need to set the TextColumn property to 2
 
Reply With Quote
 
Tim Zych
Guest
Posts: n/a
 
      5th Jun 2008
Set the ColumnCount = 2 and ColumnWidths = 0

That will display two columns in the combo, but make the first column zero
points wide, giving the appearance that there is only one column in the
list.

Use BoundColumn to change which column is selected...Combobox1.Value and a
BoundColumn = 2 returns the item from the 2nd column of the selected row.

--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"Martin" <(E-Mail Removed)> wrote in message
news:0A3F3F99-ABB6-4EBA-8D5D-(E-Mail Removed)...
>I have a combobox on a userform that has a Row Source of 3 columns and
>about
> 200 rows. I can get everything to work but the combobox will only display
> the entry from the first column of the source. I would like it to display
> the second column.
>
> I have tried changing the Bound Column to 2. In fact, I have changed it
> to
> 0, 1, 2, and 3 and the combobox always displays column 1 information.
>
> I can get it to work by shifting the columns around in my source data, but
> I
> would like to avoid that if at all possible.
>
> I am running Excel 2002.
>
> Does anyone have any suggestions?
>
> Thanks.
>



 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      5th Jun 2008
That worked. Thanks.


"Smallweed" wrote:

>
> You need to set the TextColumn property to 2

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Source of a ComboBox Ayo Microsoft Access 5 28th Mar 2008 06:51 PM
ComboBox Source John Microsoft Access Forms 3 24th Jun 2007 02:23 PM
Row Source of ComboBox =?Utf-8?B?16fXldeR16U=?= Microsoft Outlook VBA Programming 4 23rd Nov 2005 08:12 AM
Combobox source =?Utf-8?B?eW9oYW5u?= Microsoft Excel Programming 1 6th Mar 2004 02:18 PM
combobox row source scrabree Microsoft Excel Programming 1 15th Oct 2003 08:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:49 AM.