VBA Functions
Browse the functions by category. Use wildcards in search: *
and ?
.
Array / Information
Color / Misc
Conversion
Date & Time
DDB
Returns a Double specifying the depreciation of an asset for a specific time period by using the double-declining balance method or some other method you specify.
File / I-O & Environment
Returns information about a file opened with the Open statement — such as file access mode or file type.
Returns a two-dimensional array containing all key settings saved in the Windows Registry under a specified app and section.
Returns a reference to an existing OLE Automation object (for example, an Excel workbook or Word document already running).
Retrieves a key value from the Windows Registry for a specified application, section, and key.
(Mac only, deprecated) Executes an AppleScript script from within VBA and returns the result.
Financial
Returns the future value of an annuity or investment, based on periodic, constant payments and a constant interest rate.
Returns the interest payment for a given period of an annuity, based on periodic, constant payments and a constant interest rate.
Returns the internal rate of return for a series of periodic cash flows (payments and receipts).
Returns the modified internal rate of return for a series of cash flows, considering both the cost of investment and the interest received on reinvestment.
Returns the number of periods for an annuity, based on periodic, constant payments and a constant interest rate.
Returns the net present value of an investment, based on a discount rate and a series of future cash flows.
Returns the payment amount for an annuity, based on constant payments and a constant interest rate.
Returns the principal payment for a given period of an annuity, based on periodic, constant payments and a constant interest rate.
Returns the present value of an annuity or investment, based on constant payments and a constant interest rate.
Returns the interest rate per period of an annuity, given the number of periods, payment amount, present value, and (optionally) future value.
Formatting / Conversion
Math
The following is a list of nonintrinsic math functions that can be derived from the intrinsic math functions.
Program Flow / Interaction
Returns the argument portion of the command line used to launch Microsoft Visual Basic or an executable program developed with Visual Basic. The Visual Basic Command function is available in Microsoft Access, but not in other Microsoft Office applications.
Yields execution so the operating system can process other events (like keystrokes, mouse clicks, repaint requests) before resuming code.
Returns or generates a runtime error. Can also be used to supply a custom error message corresponding to an error number.
Returns the current status of the Input Method Editor (IME), used for East Asian character input.
String / Text
LTrim removes leading spaces, RTrim removes trailing spaces, and Trim removes both leading and trailing spaces from a string.