Quiz Yourself

Q.

How do you create a subroutine?

A.

To create a subroutine, you begin a line with the word Sub followed by the name of the subroutine. You end the subroutine by using the command End Sub on a line following your subroutine code.

Q.

How do you call a subroutine?

A.

You call a subroutine by placing the name of the subroutine on a line by itself at the place in your code where you want to use the subroutine.

Q.

What are three uses for subroutines in VBScript?

A.

Subroutines make code more portable and easier to read and troubleshoot, and they promote code re-use.

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.