Private Sub btnEnterSales_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnEnterSales.Click ' Get the daily sales from the user ' and calculate the total. Dim intDays As Integer ' Number of days Dim intCount As Integer ' Loop counter Dim decSales As Decimal ' To hold the daily sales Dim decTotal As Decimal ' Use as an accumulator Dim strInput As String ' To get the user input ' Store the correct starting values in the counter ' and accumulator. intCount = 1 decTotal = 0 ' Get the number of days from the user. strInput = InputBox("How many days do you have sales figures for?", _ "Number of Days Needed") intDays = CInt(strInput) ' The following loop gets the sales for each day. Do While intCount <= intDays strInput = InputBox("Enter the sales for day " & _ intCount.ToString, "Sales Amount Needed") If strInput <> "" Then decSales = CDec(strInput) ' Store input in sales decTotal += decSales ' Add sales to total intCount += 1 ' Increment the counter End If Loop ' Display the running total. lblTotal.Text = FormatCurrency(decTotal) End Sub