0

I would like to get the item in my listbox based on the index and store it to a variable.

For example:

Listbox_Sample

cary

bondoc

stack

overflow

If I want to get the index 0 of my listbox then it will store cary to a variable

Cary Bondoc
  • 2,923
  • 4
  • 37
  • 60

1 Answers1

0

This seems to do the trick. Listbox_Sample.Items(Index #)

Example:

Dim LB_Variable AS String = Listbox_Sample.Items(0)
Console.Writeline(LB_Variable)
'it will output the following
'cary
Cary Bondoc
  • 2,923
  • 4
  • 37
  • 60