View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Listbox Max Columns

I think you would have to go back to your list source to pick up all eleven
columns.
It will only pick up the bound column value or the first column value by
default as the Value source from one list box to the other. To get a row of
eleven columns you would need and array or list to load the list box.

"steve" wrote:

EXCEL 2003
I am filling 2 listboxes. The first listbox is filled like this:

lr = LastRow(ThisWorkbook.Worksheets("Mesh"))
With ThisWorkbook.Worksheets("Mesh")
Set MeshInventory = .Range(.Cells(2, "A"), .Cells(lr, "K"))
End With
With Me.lbMeshInventory
.ColumnHeads = False 'can't use this feature here
.ColumnCount = MeshInventory.Columns.Count
.List = MeshInventory.Value
End With

Since this source is bound, it lest me have more than 10 columns in the
listbox. When the user double clicks an item on the first Listbox, I want
that item added to the second listbox. I'm pulling my hair out trying to
figure out how to make the second listbox bound so it can also have more than
10 columns. Dave Peterson posted something on 3/1/07 and said to use
.AddItem, but I get an error when the code gets to the 10th column.

thank you,
Steve