Читать книгу Excel 2019 Power Programming with VBA - Michael Alexander, Dick Kusleika - Страница 187

Controlling Code Execution

Оглавление

Some VBA procedures start at the top and progress line by line to the bottom. Macros that you record, for example, always work in this fashion. Often, however, you need to control the flow of your routines by skipping over some statements, executing some statements multiple times, and testing conditions to determine what the routine does next.

The preceding section describes the For Each-Next construct, which is a type of loop. This section discusses the additional ways of controlling the execution of your VBA procedures.

 GoTo statements

 If-Then constructs

 Select Case constructs

 For-Next loops

 Do While loops

 Do Until loops

Excel 2019 Power Programming with VBA

Подняться наверх