DDB 函数 [VBA]

返回指定期间内资产的折旧,使用算术递减方法。

警告图标

该功能或常量可通过以下语句启用: Option VBASupport 1,该语句需要放置在模块的每个可执行程序代码的前面。


语法:

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

返回值:

Double

参数:

Cost 确定资产的初始成本。

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.

如果需要较高的初始折旧值而非线性折旧,请使用此折旧形式。折旧价值随每个期间的价值而减少,通常用于购买后不久价值损失较高的资产 (例如车辆、计算机)。请注意,在此计算类型下,帐面值永远不会达到零。

错误代码:

5 无效的过程调用

示例:

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