Execute archives - The VBScript Network and Systems Administrator's Cafe

The VBScript Network and Systems Administrator's Cafe:

execute

May 4 2009   5:10PM GMT

VBScript Statements: Explanation of the Execute Statement



Posted by: Jerry Lees
VBScript Statements, vbscriptstatements, VBScript, execute statement, execute

The VBScript Execute statement allows you to execute a series of VBScript statements as a block from within a VBScript Script. By itself it doesn’t sound terribly appealing… after all, Executing a series of VBScript statements is what you do inside a VBScript file.

However, if you consider that you can load the statements from another file, it becomes somewhat interesting because it could allow you to share code between scripts or add funtionality like some applications that allow scripting inside the application.

The syntax of the Execute Statement is simply as follows:

Execute statement

Statement can be a series of commands enclosed in quotes, with each command separated with a colon (:) or a variable that contains a string that is the commands you wish to execute.

For More information on this statement, check out Microsoft’s documentation here.