|
-
Sep 1st, 2010, 05:33 AM
#1
Re: [RESOLVED] Loop through listview adding items
NW, In a FOR loop, the counter variable is automaically incremented by 1 (default). There is no need of incrementing it by yourself !
 Originally Posted by http://www.vb6.us/tutorials/understanding-do-and-while-loops
By default, the variable used in the declaration of the For-Next loop is incremented by 1 each time through the loop; however, if you want to increment this value by a different amount each time through the loop, you can simply append Step (Integer) to the end of the For-Next loop declaration.
...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 1st, 2010, 06:04 AM
#2
Re: [RESOLVED] Loop through listview adding items
 Originally Posted by akhileshbc
NW, In a FOR loop, the counter variable is automaically incremented by 1 (default). There is no need of incrementing it by yourself !
Yeah, I know! However, for some reason it does not increment the value automatically.
Edit:
Although, the code using a "For" statement in my original post works as it should.
Edit:
I just tried this code and it works! I reckon the "done" event of the pop component is causing the problem or maybe I need to download the component again.
vb Code:
Private Sub Form_Load() Dim i As Integer For i = 1 To 10 Me.Caption = LstNewMail.ListItems.Add(, , i) Next i End Sub
Last edited by Nightwalker83; Sep 1st, 2010 at 07:11 AM.
Reason: Adding more!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|