vba courses london - for loop
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 VBA Training and help » vba courses london - For loop

vba courses london - For loop

resolvedResolved · Low Priority · Version Standard

replyReply Thu 8 Mar 2007, 09:40Delegate John said...

John has attended:
Excel VBA Intro Intermediate course

For loop

How do you do a 'for' loop?

For upcoming training course dates see: Pricing & availability

replyReply Fri 9 Mar 2007, 16:12 Edited on Fri 9 Mar 2007, 16:18Trainer Carlos said...

RE: for loop

John

An simple example of the for loop is:

For Counter = 1 to 100

Total = total + Cells(NoRows,4).value

Next Counter

 

Vba tip:

Use VbNullString instead of

When needing to default a String variable back to it's default of "" use vbNullString as in the following example:

Sub ClearText()

Dim strEmpName As String

strEmpName = "John Smith"
MsgBox strEmpName

strEmpName = vbNullString
MsgBox strEmpName

End Sub

View all VBA 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