98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA
VBA
Resolved · Low Priority · Version 2003
Trevor has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Access Intermediate course
Excel VBA Advanced course
VBA
What is a nested loop?
RE: VBA
Hi Trevor
Thank you for the question. A nested loop is when one loop contains another loop. The example below has a loop for the columns and a loop to do each row in each column.
Sub Square100()
Dim iRowNum As Integer
Dim iColNum As Integer
For iColNum = 0 To 9
For iRowNum = 1 To 10
ActiveCell.Offset(iRowNum, iColNum).Value = iColNum * 10 + iRowNum
Next iRowNum
Next iColNum
End Sub
I hope that explains enough.
Laura GB
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Remove unused toolbar buttonsAre there buttons on your Excel toolbars that you never use? Remove them from the toolbar by doing the following: |