hi again everyone , does anyone know how to do a loop to a list1 box with data and declare that data as a variable ?
i am stuck in listindex commands .
This code is just to add some examples on list
Private Sub Form_Load()
Dim a As String
a = 1
For i = 1 To 100
Do Until List1.ListCount = 100
a = a + 1
List1.AddItem a
Loop
Next
End Sub
Now , on command1 click i want that a loop start from the beginning of the list1 start loop until end , but without knowing how many numbers are really on the list , what i want is that in the end of last list count the loop stops .
How can i do that .
I am sure is a simple code to do it , but sometimes i get stuck in these simple code lines .
Thanks
i am stuck in listindex commands .
This code is just to add some examples on list
Private Sub Form_Load()
Dim a As String
a = 1
For i = 1 To 100
Do Until List1.ListCount = 100
a = a + 1
List1.AddItem a
Loop
Next
End Sub
Now , on command1 click i want that a loop start from the beginning of the list1 start loop until end , but without knowing how many numbers are really on the list , what i want is that in the end of last list count the loop stops .
How can i do that .
I am sure is a simple code to do it , but sometimes i get stuck in these simple code lines .
Thanks