共用方式為


Financial.SYD 方法

傳回 Double,指定資產在指定之期間內的年數總和法折舊。

命名空間: Microsoft.VisualBasic
組件: Microsoft.VisualBasic (在 microsoft.visualbasic.dll 中)

語法

'宣告
Public Shared Function SYD ( _
    Cost As Double, _
    Salvage As Double, _
    Life As Double, _
    Period As Double _
) As Double
'用途
Dim Cost As Double
Dim Salvage As Double
Dim Life As Double
Dim Period As Double
Dim returnValue As Double

returnValue = Financial.SYD(Cost, Salvage, Life, Period)
public static double SYD (
    double Cost,
    double Salvage,
    double Life,
    double Period
)
public:
static double SYD (
    double Cost, 
    double Salvage, 
    double Life, 
    double Period
)
public static double SYD (
    double Cost, 
    double Salvage, 
    double Life, 
    double Period
)
public static function SYD (
    Cost : double, 
    Salvage : double, 
    Life : double, 
    Period : double
) : double

參數

  • Cost
    必要項。Double,指定資產的初始成本。
  • Salvage
    必要項。Double,指定資產在可用期末的價值。
  • Life
    必要項。Double,指定資產的可用期間長度。
  • Period
    必要項。Double,指定計算資產折舊所用的期間。

傳回值

傳回 Double,指定資產在指定之期間內的年數總和法折舊。

備註

如需詳細資訊,請參閱 Visual Basic 的主題 SYD 函式

Life 和 Period 引數必須以相同的單位表示。例如,如果以月份表示 Life,則也必須以月份表示 Period。所有引數都必須為正數。

範例

此範例使用 SYD 函式傳回資產在指定之期間內的折舊,其條件是有給定資產的初始成本 (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 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱系統需求一節的內容。

版本資訊

.NET Framework

支援版本:2.0、1.1、1.0

.NET Compact Framework

支援版本:2.0、1.0

請參閱

參考

Financial 類別
Financial 成員
Microsoft.VisualBasic 命名空間
ArgumentException

其他資源

SYD 函式
DDB 函式
SLN 函式
財務摘要