• 19 years ago

    I have two listbox's in a program I am writing, the users can add or remove from this listbox, but once they have finished they press a confirm button and I need to use all the contents of these listboxs.

    Example ListBox1          Example ListBox2
    PC1                             File 1
    PC2                             File 2

    How can I either put all the contents of the listbox into an array, or how can I find out what is in field 2 of the listbox1?

    Hope I have made this clear?

  • 19 years ago

    To put everything in an array...


    Redim TheArray(0 To ListBox1.ItemCount-1)
    For i = 0 to ListBox1.Count-1

    I'm not sure what you mean by field2 of listbox 1... but to get the value of item 2 in listbox 1, try

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Java is to JavaScript what Car is to Carpet.” - Chris Heilmann