0% found this document useful (0 votes)
7 views4 pages

Visual Basic Branching Examples

This document summarizes examples from Chapter 3 of a Visual Basic textbook on branching. It lists 14 examples of different branching statements like If/Then, Select Case, For/Next loops, and Do/Loop statements. It instructs the user to select the "Exit Design Mode" button and then press the button for the example they want to run. These examples are presented in Chapter 3 of the referenced textbook to demonstrate programming with Visual Basic branching statements.

Uploaded by

Domingos Morgado
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Visual Basic Branching Examples

This document summarizes examples from Chapter 3 of a Visual Basic textbook on branching. It lists 14 examples of different branching statements like If/Then, Select Case, For/Next loops, and Do/Loop statements. It instructs the user to select the "Exit Design Mode" button and then press the button for the example they want to run. These examples are presented in Chapter 3 of the referenced textbook to demonstrate programming with Visual Basic branching statements.

Uploaded by

Domingos Morgado
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd

Examples from Chapter 3 in the Visual Basic textbook - Branching

Example 3.5 (If ... Then) Example 3.6 (If ... Then ... End If) Example 3.7 (If ... Else ... End

Solving the quadratic equation Raise x to power 1, 2, or 3 Example3.11 (Case Select)

a= 2 x= 2
b= 1 n= -10 Example 3.12 (Case Select)
c= 4

Example 3.9 Example 3.10 Example 3.13 (Case Select)

INSTRUCTIONS: 1 - Make sure your "Design Mode" button is set to "Exit Design Mode"
2 - Enter data if needed (Examples 3.9 or 3.10)
3 - Press button for Example you want to run

To see code, select the Visual Basic editor

These examples are presented in Chapter 3 in the textbook:

Gottfried, Byron S., 2001, Schaum's Outline of Theory and Problems of PROGRAMMING WITH VISUAL
BASIC, Schaum's Outline Series, McGRAW-HILL, INC., New York, ISBN 0-07-135671-1

Prepared by Gilberto E. Urroz, October 2002


mple 3.7 (If ... Else ... End If)

xample3.11 (Case Select)

xample 3.12 (Case Select)

xample 3.13 (Case Select)


Examples from Chapter 3 in the Visual Basic textbook - Branching

Example 3.14 (For ... Next) Example 3.15 (For ... Next) Example 3.16 (For ... Next)

Example 3.18 (a) (Do While ... Loop) Example 3.18 (b) (Do ... Loop While) Example 3.18 (c) (Do Until ... Loo

Example 3.18 (d) (Do...Loop Until) Example 3.19 (Exit Do) Example 3.20 (While ... Wend)

INSTRUCTIONS: 1 - Make sure your "Design Mode" button is set to "Exit Design Mode"
2 - Press button for Example you want to run

To see code, select the Visual Basic editor

These examples are presented in Chapter 3 in the textbook:

Gottfried, Byron S., 2001, Schaum's Outline of Theory and Problems of PROGRAMMING WITH VISUAL BASIC,
Schaum's Outline Series, McGRAW-HILL, INC., New York, ISBN 0-07-135671-1

Prepared by Gilberto E. Urroz, October 2002


Example 3.16 (For ... Next)

mple 3.18 (c) (Do Until ... Loop)

ample 3.20 (While ... Wend)

WITH VISUAL BASIC,

You might also like