formatting values in listbox using VBA

J

jeff quigley

Hello,

I am trying to formatt values in a listbox. I have 5 variables which grab
records from a table and put them into a listbox. The second variable holds
values which are quite long and are cut off by the third variable. Is there
anyway to format the contents of the list box so I can see all of the values
of the second variable.

'loop through features
Do Until pFeature Is Nothing
'add values to listbox
results.ListBox1.AddItem pFeature.Value(iARN)
results.ListBox1.List(i, 1) = pFeature.Value(iFirstName)
results.ListBox1.List(i, 2) = pFeature.Value(iMailAddress1)
results.ListBox1.List(i, 3) = pFeature.Value(iCityProvCountry)
results.ListBox1.List(i, 4) = pFeature.Value(iPostalCode)

i = i + 1
Set pFeature = pFCursor.NextFeature
Loop
 
A

Andy Pope

Hi,

Have a look at the help on the ColumnWidths property.
This will allow you to specify the widths of each column.

Cheers
Andy
 

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