[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

How do you load items from a listbox into a variable?

How would I load the contents in my listbox into a variable?
0
Taylor814
Asked:
Taylor814
  • 2
1 Solution
 
lppperesCommented:
You can do something like this:

Dim i as Integer
Dim myVar as String

For i = 0 to ListBox1.ListCount - 1
    myVar = ListBox1.List(i) & ";"
Next
0
 
Taylor814Author Commented:
I had to add:

myVar = myVar & ListBox1.List(i) & ";"
0
 
lppperesCommented:
Sorry about that.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now