codice:
Try
 Dim intCheck As Integer
 intCheck = txtSoloInteri.Text
Catch exc As InvalidCastException
 lblErr.Visible = True
 lblErr.Text = "Attenzione: inserire un intero."
Catch ex As Exception
End Try