Vba And Excel Object Model Quick Reference

VBA FUNCTION QUICK REFERENCE (CONTINUED)

File and Folder Handling Functions

FUNCTION

DESCRIPTION

RETURNS

CurDir(drive)

Returns the current path.

String

Dir[(pathname[, attributes])]

Returns the name of the file, directory, or folder that matches the specified pattern.

String

EOF(filenumber)

Returns -1 when the end of a file has been reached.

Integer

FileAttr(filenumber, returntype)

Indicates the file mode used for files opened with the Open statement.

Long

FileDateTime(pathname)

Indicates the date and time when a file was last modified.

Date

FileLen(pathname)

Indicates the length of a file in bytes.

Long

FreeFile (rangenumber)

Returns the next file number available for use by the Open statement.

Integer

GetAttr (pathname)

Returns a whole number representing the attributes of a file, directory, or folder.

Integer

Input (number, [#]filenumber)

Returns a string containing the indicated number of characters from the specified file.

String

Loc(filenumber)

Indicates the current read/write position in an open file.

Long

LOF(filenumber)

Returns the size in bytes of a file opened using the Long Open statement.

Seek(filenumber)

Specifies the current read/write position with a file opened with the Open statement.

Long

Financial Functions

FUNCTION

DESCRIPTION

RETURNS

DDB(cost, salvage, life, period[, factor])

Specifies the depreciation value for an asset during a specific time frame.

Double

FV(rate, nper, pmt[, pv[, type]])

Determines the future value of an annuity based on periodic fixed payments.

Double

IPmt(rate, per, nper, pv[, fv[, type]])

Determines the interest payment on an annuity for a specific period of time.

Double

IRR(values(), [, guess])

Determines the internal rate of returns for a series of cash flows.

Double

MIRR(values(), finance_rate, reinvest_rate)

Returns the modified interest rate of returns for a series of periodic cash flows.

Double

VBA FUNCTION QUICK REFERENCE (CONTINUED)

Financial Functions (Continued)

FUNCTION

DESCRIPTION

RETURNS

NPer(rate, pmt, pv[, fv[, type]])

Returns the number of periods for an annuity.

Double

NPV(rate, values())

Returns the net present value of an investment.

Double

Pmt(rate, nper, pv[, fv[, type]])

Returns the payment amount for an annuity based on fixed payments.

Double

PPmt(rate, per, nper, pv[, fv[, type]])

Returns the principal payment amount for an annuity.

Double

PV(rate, nper, pmt[, fv[, type]])

Returns the present value of an annuity.

Double

Rate(nper, pmt, pv[, fv[, type[, guess]]])

Returns the interest rate per period for an annuity.

Double

SLN(cost, salvage, life)

Determines the straight-line depreciation of an asset for a single period.

Double

SYD(cost, salvage, life, period)

Determines the sum-of-years' digits depreciation of an asset for a specified period.

Double

Information Functions

FUNCTION

DESCRIPTION

RETURNS

CVErr (errornumber)

Returns a user-defined error number.

Variant

Error [(errornumber)]

Returns the error message for the specified error number.

String

IsArray(varname)

Indicates whether a variable contains an array.

Boolean

IsDate (expression)

Indicates whether an expression contains a date.

Boolean

IsEmpty (expression )

Indicates whether a variable has been initialized.

Boolean

IsError (expression)

Indicates whether an expression is an error value.

Boolean

IsMissing(argname)

Indicates whether an optional argument was passed to a procedure.

Boolean

IsNull (expression )

Indicates whether an expression contains no valid data.

Boolean

IsNumeric (expression )

Indicates whether an expression is a number.

Boolean

IsObject(identifier)

Indicates whether a variable references an object.

Boolean

TypeName (varname)

Specifies the variable type.

String

VarType(varname)

Specifies the subtype of a variable.

Integer

1

Sell Your Annuity

Sell Your Annuity

Do you have annuity you dont want? Discover When is it Time to Sell Your Annuity? What can I do? Where can I get the money I need? I have an annuity, but I dont know that I can sell it. Is there a good time to sell my annuity? I already have a home improvement loan, but it was used before the roof needed replacing.

Get My Free Ebook


Post a comment