Exclusive VBA functions

Содержимое

# Exclusive VBA Functions and Statements

LibreOffice Basic adds this set of functions when VBA support is enabled.

These exclusive VBA functions are enabled when the statement Option VBASupport 1 is placed before the first macro of a LibreOffice Basic module.

## VBA Statements

## Option ClassModule Statement

Specifies that the module is a class module that contains members, properties, procedures and functions.

## Option VBASupport Statement

Specifies that LibreOffice Basic will support some VBA statements, functions and objects.

## Инструкция Enum [VBA]

Define enumerations or non UNO constant groups. An enumeration is a value list that facilitates programming and eases code logic review.

## Text functions

## Функция AscW [VBA]

Returns the Unicode value of the first character in a string expression.

## Функция ChrW [VBA]

Returns the Unicode character that corresponds to the specified character code.

## Функция InStrRev [VBA]

Returns the position of a string within another string, starting from the right side of the string.

## Функция StrReverse [VBA]

Returns the string with the character order reversed.

## StrConv Function

Convert a string as specified by a conversion type.

## Financial functions

## Функция DDB [VBA]

Returns the depreciation of an asset for a specified period using the arithmetic-declining method.

## Функция FV [VBA]

Returns the future value of an investment based on periodic, constant payments and a constant interest rate (Future Value).

## Функция IPmt [VBA]

Calculates the periodic amortizement for an investment with regular payments and a constant interest rate.

## Функция IRR [VBA]

Calculates the internal rate of return for an investment.

## Функция MIRR [VBA]

Calculates the modified internal rate of return of a series of investments.

## Функция NPer [VBA]

Calculates the number of periods for a loan or investment.

## Функция NPV [VBA]

Calculates the Net Present Value of an investment, based on a supplied discount rate, and a series of deposits and withdrawals.

## Функция Pmt [VBA]

Calculates the constant periodic payments for a loan or investment.

## Функция PPmt [VBA]

Returns for a given period the payment on the principal for an investment that is based on periodic and constant payments and a constant interest rate.

## Функция PV [VBA]

Returns the Present Value of an investment resulting from a series of regular payments.

## Функция Rate [VBA]

Returns the interest rate of a loan or an investment.

## Функция SLN [VBA]

Returns the straight-line depreciation of an asset for one period. The amount of the depreciation is constant during the depreciation period.

## Функция SYD [VBA]

Returns the arithmetic-declining depreciation rate.

## Функции даты и времени

## Функция FormatDateTime [VBA]

Applies a date and/or time format to a date expression and returns the result as a string.

## Функция MonthName [VBA]

The MonthName function returns the localized month name of a specified month number.

## Функция WeekdayName [VBA]

The WeekdayName function returns the weekday name of a specified day of the week.

## I/O Functions

## Функция Input [VBA]

Returns the open stream of an Input or Binary file (String).

## ExportAsFixedFormat Method [VBA]

Method to export a Calc document to PDF format.

## Mathematical Functions

## Функция Round [VBA]

Rounds a numeric value to a specified number of decimal digits.

## Функция FormatNumber [VBA]

Returns a string with a number formatting applied to a numeric expression.

## FormatPercent [VBA]

Returns a string with a number formatting applied to a numeric expression. A percent sign is appended to the returned string.

## Функция Partition [VBA]

Returns a string indicating where a number occurs within a calculated series of ranges.

## Object Properties and Methods

## Объект Err [VBA]

Use VBA Err object to raise or handle runtime errors.

См. также

VBA support in LibreOffice

VBA Properties

VBA supported Data Model

Option VBASupport Statement

Пожалуйста, поддержите нас!