VBScript Statements: Explanation of the Const Statement
The Const statement is useful when you want to reference a specific, unchanging, value in your code multiple times without typing it over and over. For example, in order to use the Const Statement to...
View ArticleVBScript Statements: Explanation of the Dim Statement
The DIM statement is used to declare variables prior to being used. To save space in your code, you can declare more than one variable in a single statement by separating each variable with a comma....
View ArticleVBScript Statements: Explanation of the Option Explicit Statement
In VBScript declaring your variables up front is not required (as stated in this sites explanation of the Dim Statement), however, many programmers choose to declare their variables up front to avoid...
View ArticleVBScript Statements: Explanation of the Do Loop Statement
The Do … Loop statement is very useful (like, for … next and Select … case) to execute a block of code more than once. However, where it differs from the other two is that the Do … Loop statement...
View ArticleVBScript Statements: Explanation of the Exit statement
The Exit statement in vbscript allows you to exit a block of code, in the case of a subroutine (Exit Sub) or a function (Exit Function), or the entire script. This statement is assumed at the end of a...
View ArticleVBScript Statements: Explanation of the Erase statement
The VBScript Erase statement is used to erase all the values of an array, but keep the array size and dimensions intact. This is useful when you re-use an array and you want to ensure the values...
View ArticleVBScript Statements: Explanation of the For … Next Statement
The For Next statement is very useful for situations where you need to loop through a piece of code a specific number of times. You can use Exit For statements to exit out of a For loop, if you need...
View ArticleVBScript Statements: Explanation of the For Each … Next Statement
The For Each Next statement combination is very useful for situations where you need to loop through a piece of code a specific number of times, just like the For Next statement, except that you may...
View ArticleVBScript Statements: Explanation of the Rem Statement
The VBScript REM statement is used to place a comment in your script or function. It is typically considered essential to place comments in code, not only to document what something does for others–...
View ArticleVBScript Statements: Explanation of the Execute Statement
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...
View Article