Private Sub Command1_Click()
Dim x As Integer, y As Integer, t As Integer
Dim i As Integer, n As Integer, count As Integer
x = Val(Text1.Text)
y = Val(Text2.Text)
count = 0
For i = x To y
List1.AddItem Str(i)
n = i
Do While n > 0
If n Mod 10 = 1 Then
count = count + 1
End If
Loop
Next i
Label3.Caption = "X到Y之间1的个数有" + +"个"
End Sub