0

I've this very stupid litle problem. I want to populate a combobox with numbers ranging from 00 to 99. But when I ad them with a loop as an integer the first ten numbers apear only with one digit.
I wonder, how can I ad a second digit to them like; 00, 01, 02... and so on without me typing the whole list?
Does anyone know a litle trick to this?

Thnx in advance.

2
Contributors
2
Replies
6
Views
6 Years
Discussion Span
Last Post by Eekhoorn
0

See if this helps.

ComboBox1.Items.Clear() '// clear for new input.
        For i As Integer = 0 To 99
            '// since you will get more #'s that are greater than 9, use "If Not" first.
            If Not i < 10 Then ComboBox1.Items.Add(i) Else ComboBox1.Items.Add("0" & i)
        Next
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.