Screencast-O-Matic is the free and easy way to record your screen.   Try our free Screen Recorder!

Intro to For Loops

Created: Jan 21 2016

Description

Writing a For...Next loop; using different step values; summing values in a listbox; nested loops; multi-column listbox. Shell program at http://bowerpower.net/compprog1/vb05/IntroToForLoops.zip

Notes

0:17

Writing a For loop (these loops are good when we know how many times/iterations a loop needs to happen)

1:55

Using a variable as a stopping value (also can use a variable as a starting value)

3:10

Starting value can be any number (doesn't have to be 1 or 0)

3:52

Count/step by +2 instead of the default count/step of +1

4:43

Count/step by -1 (backward) instead of the default count/step of +1

5:41

Variable scope

6:34

A loop should have documentation explaining its purpose/what it will do

7:30

Finding the sum of the numeric values in a listbox

9:30

Nested For loops (a For loop inside another For loop)

11:56

The MultiColumn property of a listbox (horizontal scrollbar at bottom)

Advertisement