#1   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default Nested For Next

Hello

If i have nested For...Next statements, for example

For j = 26 To 30
For k = 11 To 15
For l = 1 To 5
'Code inserted here
Next l
Next k
Next j

Does the first pass set j=26, k=11, l=1
and the second pass set j=26, k=11, l=2

How could i make it so that j,k,l all increment by 1 during the scond pass
through the code? For example,

The first pass set j=26, k=11, l=1
and the second pass set j=27, k=12, l=2

Best Regards
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default Nested For Next

Managed to resolve this one, i'll post my method for anyone who may find it
useful.

j = 26
k = 11
l = 1
For z = 1 To 5
'Code
j = j + 1
k = k + 1
l = l + 1
Next z


"Owen" wrote:

Hello

If i have nested For...Next statements, for example

For j = 26 To 30
For k = 11 To 15
For l = 1 To 5
'Code inserted here
Next l
Next k
Next j

Does the first pass set j=26, k=11, l=1
and the second pass set j=26, k=11, l=2

How could i make it so that j,k,l all increment by 1 during the scond pass
through the code? For example,

The first pass set j=26, k=11, l=1
and the second pass set j=27, k=12, l=2

Best Regards

Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Nested If Mickey Tables 1 February 18th 08 07:05 PM
Help with Nested Fields Jules Microsoft Word Help 12 May 8th 07 12:14 PM
Help! Nested IF Steve Microsoft Word Help 1 April 9th 05 12:54 AM
nested if then else Vaughn Microsoft Word Help 12 March 19th 05 07:40 AM
Nested If vobonyo Mailmerge 2 March 11th 05 06:11 PM


All times are GMT +1. The time now is 05:55 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"