Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selec the column to add in a listbox
I have a list in a sheet with 20 columns and a use a listbox to check the
datas in this list, for exemple: A B C D E F.... Numb Name Tel state code e-mail Validation code when i want check all the datas, i use the code below to add all the column in the listbox ListBox1.ColumnCount = 20 ListBox1.RowSource = "A4:T200" But sometimes I need check just the datas in some columns, so what i want to do is insert a commandButton that when the user press this buttom just apears in the listbox the columns B, D and F. is it possible? please someone can help? thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selec the column to add in a listbox
Ana Paula,
I think the easiest solution would be to play with the ColumnWidths property. You can still load the entire database into the ListBox, but you can just hide the columns that you don't want. For example, in a 3 column listbox, doing this: ListBox1.ColumnWidths = "0;;" will hide the first column and set the widths of the remaining 2 to automatic width. This: ListBox1.ColumnWidths = "100; 0;" will set the width of the first column to 100 points, hide the second column and the third one will use whatever room there is left. Hope this makes sense. -- Regards, Juan Pablo González "Ana Paula" wrote in message ... I have a list in a sheet with 20 columns and a use a listbox to check the datas in this list, for exemple: A B C D E F.... Numb Name Tel state code e-mail Validation code when i want check all the datas, i use the code below to add all the column in the listbox ListBox1.ColumnCount = 20 ListBox1.RowSource = "A4:T200" But sometimes I need check just the datas in some columns, so what i want to do is insert a commandButton that when the user press this buttom just apears in the listbox the columns B, D and F. is it possible? please someone can help? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I create multi choice selec drop down list in Excel please | Excel Discussion (Misc queries) | |||
excel shuts down bringing up file having multiple worksheets selec | Excel Discussion (Misc queries) | |||
Macro to capture cell value then use it for a relative range selec | Excel Programming | |||
A recorded Macro to hide certain selected columns hides non selec. | Excel Programming | |||
To have an entire row highlighted to some color if any cell in that row is selec | Excel Programming |