VBScript Compared to VBA
While VBScript and Visual Basic for Applications (VBA) are similar and are both based on the Visual Basic standard language, there are advantages to using VBScript for IWS users:
- VBScript is supported for the Microsoft Windows Embedded operating system, and VBA is not.
- VBScript brings active scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer. This prevents operations that may present risks for the Thin Client user, such as direct access to local files.
- VBScript was designed to be simple and easy to learn, with some standards from VBA modified in VBScript to make it more straightforward. For example, in VBScript the user does not have to worry about the type of each variable when declaring them because VBScript assumes the proper type for each variable automatically.
The following table lists VBScript features that VBA does not have.
|Script Engine Identification||ScriptEngine|
The following table lists VBA features that VBScript does not have.
|Array Handling||Option Base|
|Declaring arrays with lower bound <> 0|
|Collection||Add, Count, Item, Remove|
|Access to collections using ! character|
|On Error GoTo|
|Line numbers, Line labels|
|Data Types||All intrinsic data types except Variant|
|Date/Time||Date statement, Time statement|
|DDE||LinkExecute, LinkPoke, LinkRequest, LinkSend|
|Declaration||Declare (for declaring DLLs)|
|Resume, Resume Next|
|File Input/Output||All traditional Basic file I/O|
|Financial||All financial functions|
|Option Private Module|
|Select Case||Expressions containing the Is keyword or any comparison operators|
|Expressions containing a range of values using the To keyword|
|Using Objects||Collection access using !|