Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

VS 2012 Help with sales average program

$
0
0
I have to create a program that has a user input employee names then sales based on each persons quarter(1 to 4).

Here is what I have so far, I get the input box to show up for names then quarter 1 but I need the values of each quarter to be averaged in their respective labels as they are added. These values, as they are added by the user, will be placed into respective parallel arrays. There are more parts that I will need help with but one step at a time. I do not expect anyone to give me the code straight forward, but would like to be pointed in the right direction.

Code:

Option Strict On
Public Class SaleAverageForm
    Const intMAX_EMPLOYEE As Integer = 9
    Dim Employees(intMAX_EMPLOYEE) As String
    Dim decQuarter1(intMAX_EMPLOYEE) As Decimal 'Quarter 1 sales
    Dim decQuarter2(intMAX_EMPLOYEE) As Decimal 'Quarter 2 sales
    Dim decQuarter3(intMAX_EMPLOYEE) As Decimal 'Quarter 3 sales
    Dim decQuarter4(intMAX_EMPLOYEE) As Decimal 'Quarter 4 sales

    Private Sub btnEnterInfo_Click(sender As Object, e As EventArgs) Handles btnEnterInfo.Click
        Dim intCount As Integer

        For intCount = 0 To intMAX_EMPLOYEE
            Employees(intCount) = InputBox("Enter employee names.", "Employee Names")
        Next

        For intCount = 0 To intMAX_EMPLOYEE
            cboSalesperson.Items.Add(Employees(intCount))
        Next

        For intCount = 0 To intMAX_EMPLOYEE
            decQuarter1(intCount) = CDec(InputBox("Enter Quarter 1 sales.", "Quarter 1 Sales"))
            For intCount = 1 To intMAX_EMPLOYEE

            Next
        Next

    End Sub

    'Get Sales for each quarter
    'decQuarterOne = CDec(InputBox("Enter sales for quarter 1.", "Sales Average"))
    'Do Until intCount <= 25
    'decQuarterOne = CDec(InputBox("Enter sales for quarter 1.", "Sales Average"))
    'Loop




    Private Sub cboSalesperson_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboSalesperson.TextChanged

    End Sub


End Class


Viewing all articles
Browse latest Browse all 27355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>