How to display a comma in an unbound listbox.

  • Thread starter Thread starter cr113
  • Start date Start date
C

cr113

How can I display commas in an unbound listbox?
For example if I do this:

List1.AddItem "123,456;x"
List1.AddItem "456,789;y"

It display this:

123 456
456 789

It thinks the comma is a column separator.

Is there some way to format each column maybe?
 
On Wed, 17 Mar 2010 13:15:16 -0700 (PDT), cr113 <[email protected]>
wrote:

Yes that is indeed a bit curious, because semicolon is supposed to be
the column separator. Simply wrap your values in single-quotes:
List1.AddItem "'123,456';x"

-Tom.
Microsoft Access MVP
 
Yes that is indeed a bit curious, because semicolon is supposed to be
the column separator. Simply wrap your values in single-quotes:
List1.AddItem "'123,456';x"

-Tom.
Microsoft Access MVP











- Show quoted text -


That worked! It also solved the problem of right justifying text. I
can pad with spaces if I wrap it with single quotes like you said.

Thanks!
 
Back
Top