<<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops} <<This is a Hard one>> {For Next Loops}
<<This is a Hard one>> {For Next Loops}
Go Back  Xtreme Visual Basic Talk > > > <<This is a Hard one>> {For Next Loops}


Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2004, 08:00 PM
bear24rw's Avatar
bear24rw bear24rw is offline
Contributor
 
Join Date: May 2004
Location: NJ
Posts: 477
Angry <<This is a Hard one>> {For Next Loops}


Alright i have a For loop like so...

For A = 1 To 20
Label1.Text = A
Next

Now after its done with that loop i want it to do it agian...

For B = 1 To 20
For A = 1 To 20
Label1.Text = A
Label2.Text = B
Next
Next


But i dont want to have my code be liek a million lines long like....

For A = 1 To 20
Label1.Text = A
Next
For B = 1 To 20
For A = 1 To 20
Label1.Text = A
Label2.Text = B
Next
Next

cause i have to do it more then twice ... Like 6 times
so i need to know to make it so after it does it once is atomaticly adds the For B and Label2
is there any way to do it or not?
__________________
Use[vb][/vb] tags when posting code.
Reply With Quote
  #2  
Old 05-09-2004, 09:23 AM
John's Avatar
John John is offline
Bit Flipper
 
Join Date: Feb 2002
Location: The Inner Loop
Posts: 5,550
Default

I could probably help more if I understood what you were doing. If you have some code that you want to execute more than a couple times put it in a loop.

I don't see how you example will add up to a million lines of code even if you copy and pste 6 times
__________________
Subclassing|Magnetic Forms|Operator Overloading (VB2K5)|QuickSnip.NET

"These Patriot playoff wins are like Ray Charles songs, Nantucket sunsets, and hot fudge sundaes. Each one is better than the last." - Dan Shaughnessy
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program, KeyUp, Loops Neo Angelus General 2 03-12-2004 09:55 PM
Loops within loops NDaphid General 2 09-04-2003 02:23 PM
doing loops from the click() event Bombdogs General 3 07-21-2003 08:56 PM
Do loops VS For...loops CooKies Database and Reporting 5 10-22-2002 08:52 AM
Need help with Loops VHT Pittbull General 10 04-28-2002 08:54 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops} &lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
 
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
&lt;&lt;This is a Hard one&gt;&gt; {For Next Loops}
 
-->