I have an assignment that was due 3 days ago and I have run out of ideas. The code looks like this
RentalDaysTextBox.Text = RentalDaysDecimal.ToString()
SubWallDecimal = (RentalDaysDecimal * TRUE_DAILY_RATE_Decimal)
ChargeLabel.Text = SubWallDecimal.ToString("C")
All Variables and Constants have been declared. I have the RentalDaysDecimal As Decimal = 0D
because I wont know what it is until the user enters a number. When I run the program now I get
$0.00 for subtotal and total instead of the amount that should come from the calculation shown above. However, if I change RentalDaysDecimal As Decimal = 0D to RentalDaysDecimal As Decimal = 10D, the program works fine and displays 10 times the constant value in the sub and total box. So, how the heck do I get this thing to do the math with the number the customer enters? I tried a parse and that didn't work because some boxes are left blank when the customer doesn't want an item. I would really appreciate any help on this. Like I said before, its 3 days late and I have spent a crazy amount of time for something that is probably a fairly simple fix. BTW I just started using VB a week and a half ago and this is assignment 1.
RentalDaysTextBox.Text = RentalDaysDecimal.ToString()
SubWallDecimal = (RentalDaysDecimal * TRUE_DAILY_RATE_Decimal)
ChargeLabel.Text = SubWallDecimal.ToString("C")
All Variables and Constants have been declared. I have the RentalDaysDecimal As Decimal = 0D
because I wont know what it is until the user enters a number. When I run the program now I get
$0.00 for subtotal and total instead of the amount that should come from the calculation shown above. However, if I change RentalDaysDecimal As Decimal = 0D to RentalDaysDecimal As Decimal = 10D, the program works fine and displays 10 times the constant value in the sub and total box. So, how the heck do I get this thing to do the math with the number the customer enters? I tried a parse and that didn't work because some boxes are left blank when the customer doesn't want an item. I would really appreciate any help on this. Like I said before, its 3 days late and I have spent a crazy amount of time for something that is probably a fairly simple fix. BTW I just started using VB a week and a half ago and this is assignment 1.