Другие языки программирования и технологии

Программирование разветвляющихся алгоритмов на языке VBA, кто в этом шарит?

||| Dimarik |||
||| Dimarik |||
106
If...Then...Else Statement

Conditionally executes a group of statements, depending on the value of an expression.

Syntax

If condition Then [statements] [Else elsestatements]

Or, you can use the block form syntax:

If condition Then
[statements]
[ElseIf condition-n Then
[elseifstatements]
...
[Else
[elsestatements]]
End If
The If...Then...Else statement syntax has these parts:
===================================
Do...Loop Statement

Syntax

Do [{While | Until} condition]
[statements]
[Exit Do]
[statements]
Loop

Or, you can use this syntax:

Do
[statements]
[Exit Do]
[statements]
Loop [{While | Until} condition]
===============================

For Each...Next Statement

Repeats a group of statements for each element in an array or collection.

Syntax

For Each element In group
[statements]
[Exit For]
[statements]

Next [element]
===================

For...Next Statement

Repeats a group of statements a specified number of times.

Syntax

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

Next [counter]
=========================

GoSub...Return Statement
Branches to and returns from a subroutine within a procedure.

Syntax

GoSub line

...

line

...

Return
========================
GoTo Statement

Branches unconditionally to a specified line within a procedure.

Syntax

GoTo line

The required line argument can be any line label or line number.
========================
Function Statement

Declares the name, arguments, and code that form the body of a Function procedure.

Syntax

[Public | Private | Friend] [Static] Function name [(arglist)] [As type]
[statements]
[name = expression]
[Exit Function]
[statements]
[name = expression]

End Function
ВН
Вячеслав Николаев
91 264
Лучший ответ
это то что классы исключений ???это проходили но я не разбирался найдешь толковое напиши.
Алексей Дюков
Алексей Дюков
86 550
Тебе парень говорит что этим занимается? Не верь! Он с коллегой на работе задерживается и совсем другой язык использует :))
Говори что надо может подскажу !!
Павел Кириков
Павел Кириков
1 817