CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Mar 2013
    Posts
    6

    Please Help Me!!

    Hello. My name is Jennifer. I am new to the world of programming and to this forum. Please be kind. I have an assignment for my intro to programming class due tonight by midnight and i cannot figure out what is wrong with this code. I feel like i am over my head with this class. Someone please help me. I have attached my coding below so you can see what i am doing wrong. I believe it is a calculation error, not a programming error. But like i said, i am new and have no clue what i am doing.

    Code:
      Private Sub calc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calc.Click
            
            Dim north As Integer
            Dim south As Integer
            Dim east As Integer
            Dim west As Integer
    
    
            Dim LastYearSales As Double
            Dim NextYearSales As Double = 0
            Dim IncreaseAmount As Double = 0
    
            LastYearSales = Val(lastY.Text)
    
    
    
            north = 0.05
            south = 0.08
            east = 0.03
            west = 0.06
    
    
            If NSEW.Text.ToUpper = "NORTH" Then
                IncreaseAmount = north * LastYearSales
            ElseIf NSEW.Text.ToUpper = "SOUTH" Then
                IncreaseAmount = south * LastYearSales
            ElseIf NSEW.Text.ToUpper = "EAST" Then
                IncreaseAmount = east * LastYearSales
            ElseIf NSEW.Text.ToUpper = "WEST" Then
                IncreaseAmount = west * LastYearSales
            End If
    
    
    
            NextYearSales = IncreaseAmount + LastYearSales
    
    
            lblAns.Text = NextYearSales
        End Sub
    
    
    
    
    End Class
    Thank you for your time. This has been most frustrating to say the least!!
    Last edited by DataMiser; March 5th, 2013 at 11:07 PM. Reason: added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured