LISTBOX

  • 19 years ago

    I use different ListBoxes in a sheet and would like to use a loop:
    For i = 1 to 10
    The ListBox Nber i would be used
    Next i
    and I can not figure out how to write ListBox &i or something like that in this loop. I also tried to use a Function but it does not return an object but a string.
    Any solution???
    Thanks in adavnce.

  • 19 years ago

    I'm not exactly sure what you mean... do you want to add items to different listboxes? If so, try using a Control Array, then you can reference it like this:
    ListBoxes(1).AddItem "another item"
    ListBoxes(2).AddItem "hello"

Post a reply

Enter your message below

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

Contribute

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.

“Beware of bugs in the above code; I have only proved it correct, not tried it.” - Donald Knuth