You are previewing VBScript Pocket Reference.
O'Reilly logo
VBScript Pocket Reference

Book Description

Based on the bestselling VBScript in a Nutshell, this small book details every VBScript language element--every statement, function, and object--both in VBScript itself and in the Microsoft Scripting Runtime Library. Entries are arranged alphabetically by topic. In addition, appendixes list VBScript operators and VBScript intrinsic constants. The VBScript Pocket Reference is the consummate quick reference for writing scripts with VBScript.

Table of Contents

  1. VBScript Pocket Reference
  2. Alphabetical List of Entries
  3. 1. Introduction
    1. Font Conventions
    2. VBScript Conventions
    3. Datatypes
    4. Variables
    5. Operators and Precedence
    6. Constants
    7. Functions and Subroutines
    8. Program Structure
    9. Object-Oriented Programming
    10. Additional Information
  4. 2. VBScript Reference
    1. Array Handling
      1. Array Function
        1. Return Value
        2. Description
      2. Dim Statement
        1. Description
      3. Erase Statement
        1. Description
      4. Filter Function
        1. Return Value
        2. Description
      5. IsArray Function
        1. Return Value
        2. Description
      6. Join Function
        1. Return Value
        2. Description
      7. LBound Function
        1. Return Value
        2. Description
      8. ReDim Statement
        1. Description
      9. Split Function
        1. Return Value
        2. Description
    2. Assignment
      1. Set Statement
    3. Comment
      1. ' Statement; Rem Statement
        1. Description
    4. Constants
      1. Const Statement
        1. Description
    5. Data Subtype Conversion
      1. Asc, AscB, AscW Functions
        1. Return Value
        2. Description
      2. CBool Function
        1. Return Value
        2. Description
      3. CByte Function
        1. Return Value
        2. Description
      4. CCur Function
        1. Return Value
        2. Description
      5. CDate Function
        1. Return Value
        2. Description
      6. CDbl Function
        1. Return Value
        2. Description
      7. Chr, ChrB, ChrW Functions
        1. Return Value
        2. Description
      8. CInt Function
        1. Return Value
        2. Description
      9. CLng Function
        1. Return Value
        2. Description
      10. CSng Function
        1. Return Value
        2. Description
      11. CStr Function
        1. Return Value
        2. Description
      12. DateSerial Function
      13. DateValue Function
      14. Hex Function
        1. Return Value
        2. Description
      15. Oct Function
        1. Return Value
        2. Description
      16. TimeSerial Function
      17. TimeValue Function
    6. Date and Time
      1. Date Function
        1. Return Value
        2. Description
      2. DateAdd Function
        1. Return Value
        2. Description
      3. DateDiff Function
        1. Return Value
        2. Description
      4. DatePart Function
        1. Return Value
        2. Description
      5. DateSerial Function
        1. Return Value
        2. Description
      6. DateValue Function
        1. Return Value
        2. Description
      7. Day Function
        1. Return Value
        2. Description
      8. Hour Function
        1. Return Value
        2. Description
      9. Minute Function
        1. Return Value
        2. Description
      10. Month Function
        1. Return Value
        2. Description
      11. MonthName Function
        1. Return Value
        2. Description
      12. Now Function
        1. Return Value
        2. Description
      13. Second Function
        1. Return Value
        2. Description
      14. Time Function
        1. Return Value
        2. Description
      15. Timer Function
        1. Return Value
        2. Description
      16. TimeSerial Function
        1. Return Value
        2. Description
      17. TimeValue Function
        1. Return Value
        2. Description
      18. Weekday Function
        1. Return Value
        2. Description
      19. WeekdayName Function
        1. Return Value
        2. Description
      20. Year Function
        1. Return Value
        2. Description
    7. Dictionary Object
      1. Creatable
        1. Creatable
        2. Description
        3. Dictionary Object Properties
        4. Dictionary Object Methods
    8. Error Handling
      1. Err Object
        1. Description
        2. Properties
        3. Methods
      2. On Error Statement
        1. Description
    9. File System Objects
      1. Drive Object
        1. Returned by
        2. Creatable
        3. Library
        4. Description
        5. Properties
      2. Drives Collection Object
        1. Returned by
        2. Creatable
        3. Library
        4. Description
        5. Properties
      3. File Object
        1. Creatable
        2. Returned by
        3. Library
        4. Description
        5. Properties
        6. Methods
      4. Files Collection Object
        1. Creatable
        2. Returned by
        3. Library
        4. Description
        5. Properties
      5. FileSystemObject Object
        1. Creatable
        2. Library
        3. Description
        4. Properties
        5. Methods
      6. Folder Object
        1. Creatable
        2. Returned by
        3. Library
        4. Description
        5. Properties
        6. Methods
      7. Folders Collection Object
        1. Creatable
        2. Returned by
        3. Library
        4. Description
        5. Properties
        6. Methods
      8. TextStream Object
        1. Creatable
        2. Returned by
        3. Library
        4. Description
        5. Properties
        6. Methods
    10. Information Functions
      1. GetLocale Function
        1. Return Value
        2. Description
      2. IsArray Function
      3. IsDate Function
        1. Return Value
        2. Description
      4. IsEmpty Function
        1. Return Value
        2. Description
      5. IsNull Function
        1. Return Value
        2. Description
      6. IsNumeric Function
        1. Return Value
        2. Description
      7. IsObject Function
        1. Return Value
        2. Description
      8. Len, LenB Functions
        1. Return Value
        2. Description
      9. RGB Function
        1. Return Value
        2. Description
      10. ScriptEngine Function
        1. Return Value
        2. Description
      11. ScriptEngineBuildVersion Function
        1. Return Value
        2. Description
      12. ScriptEngineMajorVersion Function
        1. Return Value
        2. Description
      13. ScriptEngineMinorVersion Function
        1. Return Value
        2. Description
      14. SetLocale Function
        1. Return Value
        2. Description
      15. TypeName Function
        1. Return Value
        2. Description
      16. VarType Function
        1. Return Value
        2. Description
    11. Mathematical and Numeric
      1. Abs Function
        1. Return Value
        2. Description
      2. Atn Function
        1. Return Value
        2. Description
      3. Cos Function
        1. Return Value
        2. Description
      4. Exp Function
        1. Return Value
        2. Description
      5. Fix Function
        1. Return Value
        2. Description
      6. Int Function
        1. Return Value
        2. Description
      7. Log Function
        1. Return Value
        2. Description
      8. Randomize Statement
        1. Description
      9. Rnd Function
        1. Return Value
        2. Description
      10. Round Function
        1. Return Value
        2. Description
      11. Sgn Function
        1. Return Value
        2. Description
      12. Sin Function
        1. Return Value
        2. Description
      13. Sqr Function
        1. Return Value
        2. Description
      14. Tan Function
        1. Return Value
        2. Description
    12. Miscellaneous
      1. Eval Function
        1. Return Value
        2. Description
      2. Execute Statement
        1. Description
      3. ExecuteGlobal Statement
        1. Description
      4. LoadPicture Function
        1. Return Value
        2. Description
    13. Object Programming
      1. Class Statement
        1. Description
      2. CreateObject Function
        1. Return Value
        2. Description
      3. For Each … Next Statement
        1. Description
      4. Function Statement
        1. Description
      5. GetObject Function
        1. Return Value
        2. Description
      6. GetRef Function
        1. Return Value
        2. Description
      7. Initialize Event
        1. Description
      8. Is Operator
        1. Return Value
        2. Description
      9. Property Get Statement
        1. Description
      10. Property Let Statement
        1. Description
      11. Property Set Statement
        1. Description
      12. Set Statement
        1. Syntax 1
        2. Syntax 2
        3. Description
      13. Sub Statement
        1. Description
      14. Terminate Event
        1. Description
      15. With Statement
        1. Description
    14. Program Structure and Flow
      1. Call Statement
        1. Description
      2. Do … Loop Statement
        1. Description
      3. End … Statement
        1. Description
      4. Exit Statement
        1. Description
      5. For Each … Next Statement
      6. For … Next Statement
        1. Description
      7. Function Statement
      8. If … Then … Else Statement
        1. Description
      9. Private Statement
        1. Description
      10. Property Get Statement
      11. Property Let Statement
      12. Property Set Statement
      13. Public Statement
        1. Description
      14. Select Case Statement
        1. Description
      15. Sub Statement
      16. While … Wend Statement
        1. Description
      17. With Statement
    15. String Manipulation
      1. Asc, AscB, AscW Functions
      2. Chr, ChrB, ChrW Functions
      3. Filter Function
      4. FormatCurrency, FormatNumber, FormatPercent Functions
        1. Return Value
        2. Description
      5. FormatDateTime Function
        1. Return Value
        2. Description
      6. InStr, InStrB Functions
        1. Return Value
        2. Description
      7. InstrRev Function
        1. Return Value
        2. Description
      8. Join Function
      9. LCase Function
        1. Return Value
        2. Description
      10. Left, LeftB Functions
        1. Return Value
        2. Description
      11. Len, LenB Functions
      12. LTrim Function
        1. Return Value
        2. Description
      13. Match Object
        1. Description
        2. Creatable
        3. Returned by
        4. Properties
      14. Matches Collection Object
        1. Description
        2. Creatable
        3. Returned by
        4. Properties
      15. Mid, MidB Functions
        1. Return Value
        2. Description
      16. RegExp Object
        1. Description
        2. Properties
        3. Methods
      17. Replace Function
        1. Return Value
        2. Description
      18. Right, RightB Functions
        1. Return Value
        2. Description
      19. RTrim Function
        1. Return Value
        2. Description
      20. Space Function
        1. Return Value
        2. Description
      21. Split Function
      22. StrComp Function
        1. Return Value
        2. Description
      23. String Function
        1. Return Value
        2. Description
      24. StrReverse Function
        1. Return Value
        2. Description
      25. Trim Function
        1. Return Value
        2. Description
      26. UCase Function
        1. Return Value
        2. Description
    16. User Interaction
      1. InputBox Function
        1. Return Value
        2. Description
      2. MsgBox Function
        1. Return Value
        2. Description
    17. Variable Declaration
      1. Const Statement
      2. Dim Statement
      3. Option Explicit Statement
        1. Description
      4. Private Statement
      5. Public Statement
      6. ReDim Statement
  5. 3. Regular Expression Characters Reference
  6. About the Authors
  7. Copyright