所以這裏是我在哪裏。我無法在我創建的名爲「depreciationListBox」的列表框上顯示任何內容,我一直在爲這個項目工作一段時間,而且我非常難過。任何人都可以幫助我的任何指針或解決方案將不勝感激。VB折舊
Private Sub displayButton_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles displayButton.Click
Dim cost As Double
Dim life As Double = CDbl(lifeListBox.SelectedItem)
Dim period As Double
Dim nextPeriod As Double
Dim salvage As Double
Dim depreciation As Double
Dim isConvertedCost As Boolean
Dim isConvertedLife As Boolean
Dim isConvertedSalvage As Boolean
isConvertedCost = Double.TryParse(AssetTextBox.Text, cost)
isConvertedLife = Double.TryParse(lifeListBox.Text, life)
isConvertedSalvage = Double.TryParse(salvageTextBox.Text, salvage)
For nextPeriod = 1 To period Step 1
depreciation = Financial.DDB(cost, salvage, life, nextPeriod)
depreciationListBox.Text += nextPeriod.ToString & " " & _
Convert.ToString(depreciation) _
& ControlChars.NewLine
Next nextPeriod
If isConvertedCost AndAlso isConvertedLife _
AndAlso isConvertedSalvage Then
depreciationListBox.Text = " Year Depreciation "
End If
End Sub
我哪裏出錯了?下面是分配就是一個鏈接,它應該是怎樣看的圖像:http://books.google.com/books?id=UAo8tAQRvGUC&pg=PT415&lpg=PT415&dq=sonheim+manufacturing&source=bl&ots=G74EzxAphD&sig=tS7s6EUUmgWrq6ZXphhDhDaBpsw&hl=en&sa=X&ei=KM8pT7mPA6qq2QWtq_ncAg&ved=0CEgQ6AEwBA#v=onepage&q=sonheim%20manufacturing&f=false
感謝您的幫助! – 2012-02-02 09:22:56