Hi,
I am trying to "Show" an error message for the user in two cases:
1. If he/she did not enter a correct value for a String.
2. If he/she did not enter a correct value for a Decimal.
I know I have to use Try & Catch but each time I use them I get an error.
Private Sub ButtonAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAdd.Click
Dim AClient As New BankAccountClass
AClient.LastName = InputBox("Enter last name", "Enter")
AClient.AccountNumber = InputBox("Depost Amount", "Enter")
End Sub
And this what I used for the Decimal
Try
AClient.AccountNumber
Catch ex As Exception
MessageBox.Show("Please enter a number.")
End Try