Ciao.
Nel tuo codice dichiari la variabile IVA, ma non le assegni alcun valore, quindi non può funzionare.
Dovresti fare così:
Per sapere cos'è CType ti consiglio di leggere questo. Inoltre, se vuoi approfondire il VB.NET, leggi quicodice:Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged Dim iva As Integer = CType(TextBox1.Text, Integer) Select Case iva Case Is < 20 TextBox1.BackColor = Color.Chartreuse Case 20 TextBox1.BackColor = Color.Aqua Case Is > 21 TextBox1.BackColor = Color.DarkOliveGreen End Select End Sub End Class

