Hello everyone!
I'm writing my third program and it's running and the math formula's are working great, however, I just had a few questions.
I'm trying to use hours = CDbl(txtHours.Text) but when I start the program I get a conversion from string "" to type 'Double" is not valid...but I declared hours As a Double not a string. The program still runs and works fine, but just with that beginning error box.
Also, I have three radio buttons that represent 3 internet packages. After the user enters how many hours they have used the internet for the month, they click on a radio button and it calculates how much they owe. However, I'm finding that the first radio button representing the first package in the group is always selected at the start of the program so it displays the total right off the bat forcing the user to enter the number of hours and then click on another package just to click back to the first package that was already selected at the beginning of the program. I tried adding
rdoPackageA.Checked = False
to the beginning of the program but the radio button was still selected. I then moved them to the constructor and it didn't have any effect, the first radio button was still pre-selected.
When I added this statement and two others to clear the other radio buttons to my clear button, it works fine and clears the previous selection from the radio buttons so the user can enter a new hour figure and click on which package he wants.
Any help would be appreciated....thanks!
BTW, I'm using VB9 if that helps. :)