Financial.SLN メソッド
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)

Dim Cost As Double Dim Salvage As Double Dim Life As Double Dim returnValue As Double returnValue = Financial.SLN(Cost, Salvage, Life)
戻り値
定額法を用いて資産の 1 期あたりの減価償却費を示す Double 型の値を返します。


この例では、SLN 関数を使用して、定額法を用いた資産の 1 期あたりの減価償却費を返します。資産購入時の価格 (InitCost)、耐用年数を経た後での資産の価格 (SalvageVal)、資産の耐用年数 (LifeTime) を指定します。
Dim InitCost, SalvageVal, LifeTime, DepYear As Double Dim Fmt As String = "### ,##0.00" InitCost = CDbl(InputBox("What's the initial cost of the asset?")) SalvageVal = CDbl(InputBox("Enter the asset's value at end of its life.")) LifeTime = CDbl(InputBox("What's the asset's useful life in years?")) ' Use the SLN function to calculate the deprecation per year. Dim SlnDepr As Double = SLN(InitCost, SalvageVal, LifeTime) Dim msg As String = "The depreciation per year: " & Format(SlnDepr, Fmt) msg &= vbCrLf & "Year" & vbTab & "Linear" & vbTab & "Doubling" & vbCrLf ' Use the SYD and DDB functions to calculate the deprecation for each year. For DepYear = 1 To LifeTime msg &= DepYear & vbTab & _ Format(SYD(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbTab & _ Format(DDB(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbCrLf Next MsgBox(msg)

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- Financial.SLN メソッドのページへのリンク