Do while question

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

The Selected value is 1914 which is the last one. I want is to be the value
of theyear, while is 2000?????

Dim x As Integer = 90

Dim y As Integer = -1

Dim theyear As Integer = 2000

Do While x > -1

y = y + 1

YearAcquired.Items.Insert(0, New ListItem(Year(Date.Now) - x,
Year(Date.Now) - x))

x = x - 1

If YearAcquired.Items(y).Value = CStr(theyear) Then

YearAcquired.SelectedIndex = y

End If

Loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top