title: Use an InputBox to enter prices of 4 items
body: <p>I'm new to VB. Today I'm working on entering 4 prices for items to purchase using an input box.  I need to create a counter in a loop. The only 2 buttons on the form "Enter Prices" and "Exit". So far this is the code I have (see below). I know something is off. When I run it, I'm allowed to enter 4 numbers. But at the end, when the message box comes up to show my total, it just gives me my last number I entered. I know I've got to change a few things, as I need my numbers to be in currency. Any suggestions as to where I need to go from here to get this up and running?</p>
  
  <pre><code>Private Sub btnPrices_Click(sender As Object, e As EventArgs) Handles btnPrices.Click
  
      'Declare a variable as counter and accumulator
      Dim intcount As Integer = 1I
      Dim intAccumulator As Integer = 0I
  
      'Declare and intialize variable
      Dim strInput As String = ""
  
      'Number of Items
      Const intNUM_PRICES As Integer = 4
  
      'Pre-test loop will keep iterating as long as the expression is ture.
      Do While intcount &lt;= intNUM_PRICES
          'Get price of each item purchased
          strInput = InputBox("Enter Price " &amp; intcount, "Price Needed")
  
          'Add 1 to the counter
          intcount += 1
      Loop
  
      'Look at the value placed in the
      MessageBox.Show("Your combined Price for all 4 items is: " &amp; strInput)
  
  End Sub
  </code></pre>