So, example if hr1 is 4 then it should minus the value of total1 by 40, if 3 then by 30 etc.Code:If hr1 >= 1 Then
total1 = total1 - (hr1 * 10)
End If
For some reason it's not working and I don't get why..
Printable View
So, example if hr1 is 4 then it should minus the value of total1 by 40, if 3 then by 30 etc.Code:If hr1 >= 1 Then
total1 = total1 - (hr1 * 10)
End If
For some reason it's not working and I don't get why..
I dont see any reason why it wouldnt work unless the values are stored in textboxes...other then that it should work without a problem.
Can you give us more of the code? Looks like from the copy/paste theres another If/Then statement
Place a breakpoint (F9) at the top of the code and run the project. When execution breaks, use the Autos, Locals and watch windows to examine the values of all relevant variables, properties and expressions. Step through the code line by line (F10) and examine the state as you go. Before each step, determine what you expect to happen and then, after the step, compare that to what actually did happen. If there's a discrepancy then you've found an issue.
If this process doesn't elucidate the issue for you then post back and, rather than just saying that it doesn't work, explain what actually does happen.