Refer to all values in listbox

C

cherman

I'm sure this is easy, but I cannot figure it out.

How do I cycle through the values in a list box and refer to each one in
code? Not the selected values only, but all values.

Thanks,
Clint
 
F

fredg

I'm sure this is easy, but I cannot figure it out.

How do I cycle through the values in a list box and refer to each one in
code? Not the selected values only, but all values.

Thanks,
Clint


Dim X As Integer
For X = 0 To Me!ListBoxName.ListCount - 1
Debug.Print Me!ListBoxName.ItemData(X)
Next X
 
Top