Reading List Box...

J

Joe Smith

What is the syntax to read the nth item in the listbox.
..NetFramework 1.1. and VB.Net 2003.
Thanks,
Joe
 
H

Herfried K. Wagner [MVP]

Joe Smith said:
What is the syntax to read the nth item in the listbox.

\\\
Dim o As Object = Me.ListBox.Items(n - 1)
///

If your items are strings:

\\\
Dim s As String = DirectCast(Me.ListBox1.Items(n - 1), String)
///
 

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