Im just learning VB, and for an assignment we had to create a program which converts miles to kilometers. Anyways, got the program working no problems. but if there is no number in the input miles textbox and tthe convert button is clicked I get a "An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll" Is there anything I can put in so if the textbox is blank the value will always be assigned as 0? Thanks in advance to anyone who can help *Edit: I just read the sticky, and by no means am I trying to get someone to do my homework. The program is all coded and finished, I just need to fix this problem.