One of the more frustrating things about VBScript is the discrepancy between data that is based on the first item starting at index 0 vs. the first item starting at index 1. To help alleviate that frustration, this article attempts to present a comprehensive collection of that data, and their starting indexes.
Contents |
Objects
RegExp
- Method: Execute
- Returns: Collection (specifically a MatchCollection)
- Starting Index: 0
Scripting.Dictionary
- Method: Items
- Returns: Array
- Starting Index: 0
MSXML
- Method: getElementsByTagName("blah")
- Type: Collection
- Starting Index: 0
Word.Application
- Property: Documents
- Type: Collection
- Starting Index: 1
Word collections are generally 1-based.
Excel.Application
- Property: Workbooks
- Type: Collection
- Starting Index: 1
Excel collections, like Word collections, are generally 1-based.
Window-Eyes Objects
Windows
- Property: Item
- Type: Window
- Starting Index: 1
Keys
- Property: Item
- Type: Key
- Starting Index: 0
ListviewItems
- Property: Text
- Type: ListViewItem
- Starting Index: 1
VBScript Functions
Split
- Returns: Array
- Starting Index: 0


