Forse così va un po' meglio... (credo che sia il caso di fare un ripassino delle basi del linguaggio):
codice:
If (IsNumeric(TextBox1.Text) = False) OR (IsNumeric(TextBox2.Text) = False) Then
MsgBox("Inserire valori numerici ", vbCritical, "ERRORE")
TextBox1.Text = ""
TextBox2.Text = ""
Else
... ' Tutto il resto
End If
Una versione equivalente, ma più elegante:
codice:
If Not(IsNumeric(TextBox1.Text)) OR Not(IsNumeric(TextBox2.Text)) Then
MsgBox("Inserire valori numerici ", vbCritical, "ERRORE")
TextBox1.Text = ""
TextBox2.Text = ""
Else
... ' Tutto il resto
End If
Ciao.