Appendix B. VBA Statements and Functions Reference

This Appendix contains a complete listing of all Visual Basic for Applications (VBA) statements and built-in functions. For details, consult Excel’s online help.

Note

Note

There are no new VBA statements in Excel 2007.

Table B-1. Summary of Vba Statements

Statement

Action

AppActivate

Activates an application window

Beep

Sounds a tone via the computer’s speaker

Call

Transfers control to another procedure

ChDir

Changes the current directory

ChDrive

Changes the current drive

Close

Closes a text file

Const

Declares a constant value

Date

Sets the current system date

Declare

Declares a reference to an external procedure in a Dynamic Link Library (DLL)

DefBool

Sets the default data type to Boolean for variables that begin with specified letters

DefByte

Sets the default data type to Byte for variables that begin with specified letters

DefCur

Sets the default data type to Currency for variables that begin with specified letters

DefDate

Sets the default data type to Date for variables that begin with specified letters

DefDec

Sets the default data type to Decimal for variables that begin with specified letters

DefDbl

Sets the default data type to Double for variables that begin with specified letters

DefInt

Sets the default data type to Integer for variables that begin with specified letters

DefLng

Sets the default data type to Long for variables that begin with specified letters

DefObj ...

Get Excel® 2007 Power Programming with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.