IT. Expert System.

VBS

For Each...Next


Description

The For Each...Next statement repeats a group of statements for each element in an array or collection.

This statement has the following form:

For Each element In group
   [statements]
   [Exit For]
   [statements]
Next [element]
Parameter Description
element (required) Specifies a variable used to iterate through the elements of the collection or array.

For collections, element can only be a Variant variable, a generic Object variable, or any specific Automation object variable.

For arrays, element can only be a Variant variable
group (required) Specifies the name of an object collection or array
statements (optional) One or more statements that are executed on each item in group

Examples

The following example shows the basic use of this statement:

Dim numbers(2)
numbers(0) = "one"
numbers(1) = "two"
numbers(2) = "three"

For Each x In numbers
  Msgbox(x)
Next

This produces the following result (each line in a separate pop-up message box):

one
two
three

Miscellaneous Information

Supported in Version: 2.0


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 257 / 158679610. Delta: 0.00315 с