Hi all,

List boxes in VB 6 can be filled with strings,bit how can I fill them with integers?.

For example if I wanted to take a number from list box 1 and add it to list box 2 and place the result in a textbox.

One way round it is by initiating a load of Int variables then adding an If statement like this

Dim a As Int
Dim b As int

If List1.Text = 1 then
a= 20(or any integer)
end if
If List1.Text = 2 then
a= 20(or any integer)
Text1.Text = a

..and so on.But this could take all day especially if I have hundreds of numbers in my list box.

So is there any way I can just convert the strings to integers...or even just enter the list box items as ints(or floats or any numeric)

Kind Regards
Tommy