saving items in listboxes

visual basic 2008 , , visual studio Pasadena, United States
  • 9 years ago
    is it possible to save items in listboxes without selecting them?
  • 9 years ago

    dim i%

    for i=0 tolistbox.listems.count listbox.listindex=0 with recordset recordset.field=listbox.text endwith listbox.listindex=i next i

  • 9 years ago

    What do you mean without selectng them?

  • 9 years ago

    This will not be exact but the code will be almost just like this. also i dont know what you are exactly trying to do so i will just leave the spot blank where it will execute your code for "saving".

    Visual Studio 2008 code...

    Dim i As Integer Dim count As String i = "0" count = listbox.items.count

    Do While (i < count)

    [[your code here]]

    i = i + 1 Loop

    Now whatever you want to do with the data you can put where I have [[your code here]]

    Hope it helps Corey

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.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler