Table C.2 Visual Basic Keywords Not in VBScript
| Keyword/Feature | Description |
| Array Handling | |
| Option Base | Declares default lower bound |
| Arrays with lower bound <> 0 | All arrays must have 0 lower bound |
| Clipboard | |
| Clipboard object | Provides access to the clipboard |
| Clear | Clears the contents of the clipboard |
| GetFormat | Determines format of clipboard object |
| GetData | Returns data from the clipboard |
| SetData | Stores data in the clipboard |
| GetText | Returns text from the clipboard |
| SetText | Stores text in the clipboard |
| Collection | |
| Add | Adds an item to a collection |
| Count | Returns number of items in collection |
| Item | Returns an item from a collection |
| Remove | Removes an item from a collection |
| Access collections using ! character | Accesses a collection with ! |
| Conditional Compilation | |
| #Const | Defines a compiler constant |
| #If…Then…#Else | Conditional compilation |
| Constants/Literals | |
| Const | Defines a constant |
| All intrinsic | Predefined constants such as vbOK constants |
| Exponent-based | Real numbers using exponents real number |
| Trailing data type characters | Defines data types implicitly |
| Control Flow | |
| DoEvents | Yields execution to Windows |
| GoSub…Return | Branches to a label in a procedure |
| GoTo | Goes to a label in a procedure |
| On Error GoTo | Goes to a label on an error |
| On…GoSub | Branches to a label on an index |
| On…GoTo | Goes to a label on an index |
| Line numbers | Line numbers |
| Line labels | Labels define GoTo/GoSub targets |
| With…End With | Provides easy access to an object |
| Conversion | |
| Chr$ | Returns a character from an ASCII code |
| Hex$ | Returns string hex from a number |
| Oct$ | Returns string octal from a number |
| Ccur | Converts expression to currency |
| Cvar | Converts expression to a variant |
| CVDate | Converts an expression to a date |
| Format | Formats a string |
| Format$ | Formats a string |
| Str | Returns a string form of a number |
| Str$ | Returns a string form of a number |
| Val | Returns a number from a string |
| Data Types | |
| All intrinsic data types except variant | Data types such as Date |
| Type…End Type | Defines user-defined data type |
| Date/Time | |
| Date statement | Returns the current date |
| Time statement | Returns the current time |
| Date$ | Returns the current date |
| Time$ | Returns the current time |
| Timer | Returns seconds elapsed since midnight |
| DDE | |
| LinkExecute | Sends command during DDE conversation |
| LinkPoke | Sends data during a DDE conversation |
| LinkRequest | Receives data during DDE conversation |
| LinkSend | Sends data during a DDE conversation |
| Debugging | |
| Debug.Print | Prints to the debugging window |
| End | Shuts down the application |
| Stop | Stops the application |
| Declaration | |
| Declare | Declares a DLL |
| Property Get | Defines a user-defined class |
| Property Let | Defines a user-defined class |
| Property Set | Defines a user-defined class |
| Public | Declares a public variable |
| Private | Declares a private variable |
| ParamArray | Accepts a variable number of arguments |
| Optional | Specifies an optional argument |
| New | Creates a new object |
| Error Handling | |
| Erl | Returns the line number of an error |
| Error | Returns an error message |
| Error$ | Returns an error message |
| On Error…Resume | Enables error handling |
| Resume | Resumes after an error |
| Resume Next | Resumes after an error |
| File Input/Output | |
| All | Opens, reads, writes, and closes files |
| Financial | |
| All financial | Financial function such as Rate functions. |
| Graphics | |
| Cls | Clears the screen |
| Circle | Draws a circle |
| Line | Draws a line |
| Point | Draws a point |
| Pset | Changes a point’s color |
| Scale | Defines the coordinate system |
| Prints to a file | |
| Spc | Position output using Print |
| Tab | Inserts a tab character |
| TextHeight | Returns height of a text string |
| TextWidth | Returns width of a text string |
| LoadPicture | Loads a picture from disk |
| SavePicture | Saves a picture to disk |
| QBColor | Returns an RGB color code |
| RGB | Combines RGB color codes |
| Manipulating Objects | |
| Arrange | Arranges windows |
| Zorder | Changes z-order of windows |
| SetFocus | Sets focus to a window |
| InputBox$ | Prompts the user for a string |
| Drag | Begins a drag-and-drop operation |
| Hide | Hides a form |
| Show | Shows a form |
| Load | Loads a form |
| Unload | Unloads a form |
| Move | Moves a form |
| PrintForm | Prints a form |
| Refresh | Repaints a form |
| AddItem | Adds item to list box |
| RemoveItem | Removes item from a list box |
| Miscellaneous | |
| Environ | Returns the user’s environment |
| Environ$ | Returns the user’s environment |
| SendKeys | Sends keystrokes to a window |
| Command | Returns the command line parameters |
| Command$ | Returns the command line parameters |
| AppActivate | Activates an application’s window |
| Shell | Launches another program |
| Beep | Beeps the speaker |
| Object Manipulation | |
| GetObject | Returns an OLE object from a file |
| TypeOf | Returns the type of an object |
| Operators | |
| Like | Compares to strings |
| Options | |
| def type | Sets default data type for variables |
| Option Base | Sets default lower bound for arrays |
| Option Compare | Defines default comparison method |
| Option Private | Defines default scope module |
| Printing | |
| TextHeight | Returns height of a text string |
| TextWidth | Returns width of a text string |
| EndDoc | Terminates a print operation |
| NewPage | Ejects the current page |
| PrintForm | Prints a form |
| Strings | |
| All fixed-length | Strings with a fixed length |
| LCase$ | Converts a string to lowercase |
| UCase$ | Converts a string to uppercase |
| Lset | Left-aligns a string |
| Rset | Right-aligns a string |
| Space$ | Pads a string with spaces |
| String$ | Pads a string with a character |
| Format | Formats a string |
| Format$ | Formats a string |
| Left$ | Returns left portion of a string |
| Mid$ | Returns middle portion of a string |
| Right$ | Returns right portion of a string |
| Mid Statement | Replaces a portion of a string |
| Trim$ | Removes leading and trailing spaces |
| LTrim$ | Removes leading spaces from a string |
| RTrim$ | Removes trailing spaces from a string |
| StrConv | Performs various conversions |
| Using Classes | |
| TypeName | Defines a user-defined class |
| Optional Arguments | |
| IsMissing | Indicates missing optional argument |
- Key Differences Between VB and VBScript
- Visual Basic Keywords Included in VBScript
- Visual Basic Keywords Omitted from VBScript
© Copyright Macmillan Computer Publishing. All
rights reserved.


