I'm doing a, I guess simple if...then...else.
It's supposed to calculate and display the number of gallons of water used and the total charge for the water, which is .00175/gal. It should only make the calculations when the current meter reading is >= the previous meter reading, or else it should print an error message.
Private Sub calculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculateButton.Click If (Val)currentTextBox < (val)previousTextBox Then badlabel.text = "Error" Else totalgallonsLabel = Val(currentTextBox) + Val(previousTextBox) totalchargeLabel = totalgallonsLabel * 0.00175 End If End Sub
But it's giving errors which I've attatched. Is there an/many obvious mistake/s that I'm making?
Thank you.
Attached image(s)
This post has been edited by ritsybitsy: 14 December 2009 - 01:57 PM

New Topic/Question
Reply




MultiQuote







|