Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Hiding a column in a multicolumn combobox

A number of articles/posts have hinted that you can have a multicolumn
combobox, and then set the columns that you don't want to see to size of
zero. But I'm not seeing that this works--the column I want to hide
still appears.

Is this possible? Advice?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hiding a column in a multicolumn combobox

Mike,

All you need to do is load multiple columns in the combobox, but don't set
the columncount property, leave it at the default 1. Then just access the
subsequent column as any other multi-column combobox, for example

Private Sub ComboBox1_Click()
MsgBox ComboBox1.List(ComboBox1.ListIndex, 1)
End Sub

Private Sub UserForm_Activate()
Dim ary, i, j

ary = [{"Bob","M", 123;"Lynne","F",898;"Amy","F",543}]

With ComboBox1
.ColumnCount = 1 'not necessary, juts to prove it
For i = 1 To 3
.AddItem ary(i, 1)
For j = 2 To 3
.List(.ListCount - 1, j - 1) = ary(i, j)
Next j
Next i
End With
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mike Jones" wrote in message
...
A number of articles/posts have hinted that you can have a multicolumn
combobox, and then set the columns that you don't want to see to size of
zero. But I'm not seeing that this works--the column I want to hide
still appears.

Is this possible? Advice?

Thanks.



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
Hiding a column of hyperlinks behind a column of numbers cmiling New Users to Excel 2 November 20th 09 05:02 PM
Hiding a ComboBox with a Checkbox AWeb Excel Worksheet Functions 2 September 15th 06 01:30 PM
Display multicolumn box Alen32 Excel Programming 6 March 13th 05 12:02 PM
display multicolumn box Alen32 Excel Programming 1 March 12th 05 05:00 PM
Multicolumn Combo Box PokerDude Excel Programming 2 January 29th 04 04:02 PM


All times are GMT +1. The time now is 06:21 PM.

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

About Us

"It's about Microsoft Excel"