Ciao renygade,
perdona la mia ignoranza, sono un pò agli inizi e non capisco bene cosa vuoi dire, il mio codice funziona esegue tutte le operazioni, se provo ad inserire altri valori tipo lettere o simboli non lo fa fare quindi non vedo il motivo di fare la verifica, già mi accetta solo numeri, magari quella dei valori può essere una buona idea Grazie.Comunque per le TexBox2 e 4 ho usato questa formula:
Private Sub TextBox2_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox2.KeyPress
Dim KeyAscii As Short = Asc(e.KeyChar)
If KeyAscii < 48 And KeyAscii <> 24 And KeyAscii <> 8 And e.KeyChar <> "," And e.KeyChar <> "." Then
KeyAscii = 0
ElseIf KeyAscii > 57 Then
KeyAscii = 0
End If
If e.KeyChar = "." Then
KeyAscii = 44
End If
If TextBox2.TextLength = 0 And KeyAscii = 44 Then
KeyAscii = 0
End If
If (KeyAscii = 44) And _
TextBox2.Text.IndexOf(",") > 0 Then
KeyAscii = 0
End If
e.KeyChar = Chr(KeyAscii)
End Sub