How to make a VB exception handling for no value in a Textbox
- by Twocold
I want to catch an exception when user enter no value in a Textbox and try to process further by press a button, I know I can use "If else" statement to make it. but in terms of "Try and Catch" block, I dont know how. Here is the code sample.
Dim NameString As String
Try
NameString = OperatorNameTextBox.Text
Catch ex As ArgumentException
MessageBox.Show("Enter a String Value")
End Try