ListBox Value List

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I'm trying to set a Listbox with a Value List in VBA but the actual list
itself is giving me problems.

Me.List5.RowSourceType = "Value List"
Me.List5.RowSource = (;1;"Main";2;"Mod";3;"Sub")
Me.List5.ColumnCount = 3
Me.List5.ColumnWidths = ".4 in;.4 in;4 in"

It's the rowsource......

Any help appreciated.
Thanks
DS
 
I'm trying to set a Listbox with a Value List in VBA but the actual list
itself is giving me problems.

Me.List5.RowSourceType = "Value List"
Me.List5.RowSource = (;1;"Main";2;"Mod";3;"Sub")
Me.List5.ColumnCount = 3
Me.List5.ColumnWidths = ".4 in;.4 in;4 in"

It's the rowsource......

Any help appreciated.
Thanks
DS

Well, what do you want to see?

It looks to me like your RowSource is suitable for a *two* column listbox
looking like

<null> 1
"Main" 2
"Mod" 3
"Sub" <undefined>

or perhaps

1 "Main"
2 "Mod"
3 "Sub"

If you want three columns, your rowsource should contain triplets of values,
for the three columns for each row.

What do you want the listbox to display, graphically? And what do you want it
to do?
 
I want to see....
1 Main Item
2 Mod
3 Sub

I think the problem was I had three columns....when I needed two. It seems
to work now....
Thank You John
DS
 
Back
Top