how to add in a listView itens that start's in 1 to 50.
I know there is an easiest way then
VB Code:
Private Sub Form_Load() List1.AddItem 1 List1.AddItem 2 . . . List1.AddItem 50 End Sub
Thanks
Printable View
how to add in a listView itens that start's in 1 to 50.
I know there is an easiest way then
VB Code:
Private Sub Form_Load() List1.AddItem 1 List1.AddItem 2 . . . List1.AddItem 50 End Sub
Thanks
ListBox or ListView?:confused:
Anyways
VB Code:
'ListBox For X = 1 To 50 List1.AddItem X Next
VB Code:
'ListView For X = 1 To 50 ListView1.ListItems.Add ,,X Next
and if I wnat to add A to P
thanks
There is alos an index which lets you decide where in the list to add the new item, but that may be more info than you need right now...
Quote:
Originally posted by Daskalos
and if I wnat to add A to P
thanks
VB Code:
For X = Asc("A") To Asc("P") List1.AddItem Chr(X) Next
thank you very much :)
Can't test, but intrigues...can you use step on this code as well and skip every other letter?
Sure.
VB Code:
For x = Asc("A") To Asc("P") Step 2 List1.AddItem Chr(X) Next
Did not know you could do ths. Pretty cool...;)