Twitter
LinkedIn
YouTube
RSS
Facebook

VBA For Loop

Use the VBA For Loop when you know how many iterations the code should make. Using this VBA For Loop will allow you to loop for a specific number of times.

Take a look at the video:

The syntax for the VBA For Loop is:

For counter= start To end [Step step]
[statements]
Next counter

You specify the start and end values for the counter, and by default, the code steps forward from less to greater.

1

By using the “Step” keyword you can alter the increments, other than 1, the code moves forward through.

1

You can also use the VBA For Loop in reverse by specifying “Step -1″

1

Exit a VBA For Loop by using the Exit For statement.

<< VBA Do Loop | Recordset In VBA – PT1 >>


Sign Up For A FREE MS Access VBA Video Tutorial Subscription. You will get over 27 tutorial videos that will help you do your job better! Start Yours Now At:
http://vbahowto.com/ms-access-tutorial

Helpful? Consider giving us a tip. Thanks!

($5 suggested amount)
(...10% of your gift amount will go to charity)




Want All The Access Videos?, Click Here!





Need help? Click and Call LoeblCom Services



Leave a Reply

You must be logged in to post a comment.