I have been working on a project for my college where i have to create a program that can be used on a hand held computer for waiters. I have created another form where the user can enter a table number, however when the text box is empty after being inputted into an error occurs.
System.InvalidCastException 'Conversion from string "" to type 'double' is not valid'
Public Module GlobalVariables
Public TableNumber As Integer
End Module
Public Class Form1
Private Sub TableNumber_TableNumber_TextChanged(sender As Object, e As EventArgs) Handles TableNumber_TableNumber.TextChanged
If TableNumber_TableNumber.Text > 25 Then
TableNumber_Error.Visible = True
If TableNumber_TableNumber.Text < 1 Then
TableNumber_Error.Visible = True
End If
End If
End Sub
End Class
This is my first time coding in visual basic, i am confused because i have not cast anything as a double.