ListBoxes and Commas

G

Guest

When I try to add a string to a listbox using the AddItem method, it automatically parses the comma in the string. Is there any way around this short of removing the comma? It is fairly important that the field be allowed to include commas, both for ease of use and because I need the official entity name for tax purposes.

Please Help!
 
S

Sandra Daigle

Hi Elizabeth,

Try wrapping the value in quotes before you add it:

Me.List0.AddItem Chr$(34) & Me.Text2 & Chr$(34)

or

Me.List0.AddItem """" & Me.Text2 & """"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top