LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Nested Loop

Even though the below code can't duplicate sheetname after the first 5 j
loops, Why when I step through the code after the 5th time through the j
Does it go back to For j (and when I hold the mouse over j it shows 6
And want to run lines 4 and 5 a sixth time?
Confused with Nested looping here..



Sub AddSheets()
For i = 1 To 52
For j = 1 To 5
Sheets.Add After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = Format(Weekday(j + 1), "dddd")
Next j
Next i
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested loop [email protected] Excel Worksheet Functions 1 April 5th 07 12:50 AM
Nested Loop Link ashcrusher Excel Worksheet Functions 0 January 13th 06 03:46 AM
nested if loop with logical OR/AND sa02000[_9_] Excel Programming 4 October 11th 05 03:44 PM
Nested loop order? jclark419[_4_] Excel Programming 2 July 29th 05 07:41 PM
Nested Loop Frank Kabel Excel Programming 6 September 12th 04 02:41 AM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"