vba
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA

VBA

resolvedResolved · Low Priority · Version 2003

replyReply Thu 25 Sep 2008, 16:30Delegate Trevor said...

Trevor has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Access Intermediate course
Excel VBA Advanced course

VBA

What is a nested loop?

For upcoming training course dates see: Pricing & availability

replyReply Thu 23 Oct 2008, 18:04Trainer Laura said...

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

 

Please browse our web site to find out more about
microsoft.excel.courses.in.london and other Microsoft training courses.

Excel tip:

Paste with Live Preview in Excel 2010

Did you know you can preview what you are about to paste? Here's how to do it.

Copy what you are about to paste
Position the cursor where you want to paste
Right click to display the shortcut menu
Place the cursor over the Paste Options and this will give you a preview of the what you are about to paste.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard