So for this program the task is to create a program for a car rental company. The different kinds of cars are chosen by radio buttons and the cost of the car to rent (per day) is multiplied by the days it will be rented. I've done everything by the books so what's wrong? It keeps coming up with the Message Box I coded telling me that the data I'm entering is not numeric (which it is)
Dim decJeepWrangler As Decimal = 55D
Dim decLandRover As Decimal = 125D
Dim decPickup As Decimal = 85D
Dim intDays As Integer
Dim decTotalCost As Decimal
Dim decCost As Decimal
If IsNumeric(txtDays) Then
intDays = Convert.ToInt32(txtDays)
If intDays > 0 Then
If radJeepWrangler.Checked Then
decCost = decJeepWrangler
ElseIf radLandRover.Checked Then
decCost = decLandRover
ElseIf radPickup.Checked Then
decCost = decPickup
End If
decTotalCost = intDays * decCost
lblTotalCost.Text = decTotalCost.ToString("C")
Else
MsgBox("You entered " & intDays.ToString() & ". Enter a positive number", , "Input Error")
txtDays.Text = ""
txtDays.Focus()
End If
Else
MsgBox("Enter how many days you will be renting", , "Input Error")
txtDays.Text = ""
txtDays.Focus()
End If
End Sub