Funció SLN [VBA]

Retorna l'amortització lineal d'un actiu durant un període. L'import de la depreciació és constant durant el període de depreciació.

warning

Aquesta funció o constant s'activa amb l'expressió Option VBASupport 1 plaçada en un mòdul abans del codi executable.


Sintaxi:


SLN (Cost as Double, Salvage as Double, Life as Double)

Valor de retorn:

Double

Paràmetres:

Cost és el cost inicial d'un actiu.

Salvage is the value of an asset at the end of the depreciation.

Life is the depreciation period determining the number of periods in the depreciation of the asset.

Codis d'error

5 La crida al procediment no és vàlida

Exemple:


REM ***** BASIC *****
Option VBASupport 1
Sub ExampleSLN
REM Calculate the yearly depreciation of an asset that cost $10,000 at
REM the start of year 1, and has a salvage value of $1,000 after 5 years.
Dim y_dep As Double
y_dep = SLN( 10000, 1000, 6 )
print y_dep ' retorna 1500.
End Sub

Ens cal la vostra ajuda!