March 5th, 2013, 07:16 PM
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.
Thank you for your time. This has been most frustrating to say the least!!
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
NextYearSales = IncreaseAmount + LastYearSales
lblAns.Text = NextYearSales
Last edited by DataMiser; March 5th, 2013 at 10:07 PM.
Reason: added code tags
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.