title: VB Depreciation
body: <p>So here is where I am at.  I can't get anything to display on the list box that I created named "depreciationListBox" I have been working on this project for a while and I am quite stumped.  Any pointers or solutions that anyone could help me would be much appreciated.  </p>
  
  <pre><code>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 &amp; "    " &amp; _
        Convert.ToString(depreciation) _
        &amp; ControlChars.NewLine
    Next nextPeriod
  
    If isConvertedCost AndAlso isConvertedLife _
        AndAlso isConvertedSalvage Then
      depreciationListBox.Text = "    Year    Depreciation   "
    End If
  End Sub 
  </code></pre>
  
  <p>Where did I go wrong?  Here is a link to what the assignment is and an image of how it is supposed to look: <a href="http://books.google.com/books?id=UAo8tAQRvGUC&amp;pg=PT415&amp;lpg=PT415&amp;dq=sonheim+manufacturing&amp;source=bl&amp;ots=G74EzxAphD&amp;sig=tS7s6EUUmgWrq6ZXphhDhDaBpsw&amp;hl=en&amp;sa=X&amp;ei=KM8pT7mPA6qq2QWtq_ncAg&amp;ved=0CEgQ6AEwBA#v=onepage&amp;q=sonheim%20manufacturing&amp;f=false" rel="nofollow">http://books.google.com/books?id=UAo8tAQRvGUC&amp;pg=PT415&amp;lpg=PT415&amp;dq=sonheim+manufacturing&amp;source=bl&amp;ots=G74EzxAphD&amp;sig=tS7s6EUUmgWrq6ZXphhDhDaBpsw&amp;hl=en&amp;sa=X&amp;ei=KM8pT7mPA6qq2QWtq_ncAg&amp;ved=0CEgQ6AEwBA#v=onepage&amp;q=sonheim%20manufacturing&amp;f=false</a></p>