Módulo
Contido
Índice 🔎︎

# DDB Function [VBA]

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

Esta función ou constante actívase coa instrución Option VBASupport 1 colocada antes do código de programa executábel dun módulo.

## Sintaxe:

    DDB(Cost As Double, Salvage As Double, Life as Double, Period as Double, [Factor as Variant])

## Valor de retorno:

Double

## Parámetros:

Cost fixes the initial cost of an asset.

Salvage fixes the value of an asset at the end of its life.

Life is the number of periods (for example, years or months) defining how long the asset is to be used.

Period states the period for which the value is to be calculated.

Factor (optional) is the factor by which depreciation decreases. If a value is not entered, the default is factor 2.

Use this form of depreciation if you require a higher initial depreciation value as opposed to linear depreciation. The depreciation value gets less with each period and is usually used for assets whose value loss is higher shortly after purchase (for example, vehicles, computers). Please note that the book value will never reach zero under this calculation type.

## Códigos de erro

5 Chamada de procedemento incorrecta

## Exemplo:

    Sub ExampleDDB
     Dim ddb_yr1 As Double
     ddb_yr1 = DDB(75000,1,60,12,2)
     Print ddb_yr1 ' returns 1,721.81 currency units.
    End Sub

Temas relacionados

DDB function in CALC

Funcións financeiras de VBA