I am trying to write a program that shows depreciation over a period of several years. This is what I have so far but I still don't know how to show the year-by-year description of depreciation like I have below. Please help!
Public Class frmDepreciation
Dim item As String
Dim Year As Double
Dim Cost As Double
Dim Estimate As Double
Dim SalvageValue As Integer = 0.0
Dim LineFormula As Double
Dim DoubleDeclining As Double
Dim Depreciation As Double
Dim Balance As Double
Dim Beginningval As Double
Dim EndVal As Double
Dim Total As Double
Dim Counter As Double
Private Sub btnDouble_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDouble.Click
item = txtDescription.Text
Year = Val(txtPurchase.Text)
Cost = Val(txtCost.Text)
Estimate = Val(txtEstimate.Text)
'For Figuring Depreciation
Depreciation = Cost / 2
Balance = Cost - Depreciation
DoubleDeclining = (Cost - SalvageValue / Estimate) * 2
lstTotals.Items.Clear()
lstTotals.Items.Add("Description: " & item)
lstTotals.Items.Add("Year of Purchase: " & Year)
lstTotals.Items.Add("Cost: " & FormatCurrency(Cost))
lstTotals.Items.Add("Estimated life: " & Estimate)
lstTotals.Items.Add("Method of Deprection: Double-Declining Balance")
lstTotals.Items.Add("")
lstTotals.Items.Add("Value at beginning of " & Year & ": " & FormatCurrency(Cost))
lstTotals.Items.Add("Amount of depreciation during " & Year & ": " & FormatCurrency(Depreciation))
lstTotals.Items.Add("Total depreciation at the end of " & Year & ": " & FormatCurrency(Balance))
End Sub
Private Sub btnStraightLine_Click(sender As System.Object, e As System.EventArgs) Handles btnStraightLine.Click
item = txtDescription.Text
Year = Val(txtPurchase.Text)
Cost = Val(txtCost.Text)
Estimate = Val(txtEstimate.Text)
LineFormula = (Cost - SalvageValue / Estimate)
lstTotals.Items.Clear()
lstTotals.Items.Add("Description: " & item)
lstTotals.Items.Add("Year of Purchase: " & Year)
lstTotals.Items.Add("Cost: " & FormatCurrency(Cost))
lstTotals.Items.Add("Cost: " & Estimate)
lstTotals.Items.Add("Method of Deprection: Straight Line")
lstTotals.Items.Add("")
lstTotals.Items.Add("Value at beginning of " & Year & ": " & FormatCurrency(Cost))
lstTotals.Items.Add("Amount of Depreciation during " & Year & ": " & FormatCurrency(Depreciation))
lstTotals.Items.Add("Total Depreciation at end of " & Year & ": " & FormatCurrency(Total))
Depreciation = Cost / Estimate
Beginningval = Cost - Depreciation
EndVal = Beginningval - Depreciation
Total = Cost - EndVal
End Sub
End Class

New Topic/Question
Reply



MultiQuote




|