vi chiedo una cortesia: Come posso mettere all'interno di questa
Sub un controllo con un if KeYAscii...... e poi un then msgbox .....

per fare in modo che se inserisco una lettera dove devo inserire un numero.

Grazie.. ecco il CODICE SOTTO.


Private Sub txtLower_KeyPress(KeyAscii As Integer)

Dim s As String

If KeyAscii >= Asc("0") Or KeyAscii <= Asc("9") Then
s = Replace(txtLower, ".", "")
txtLower = FormatNumber(s & Chr$(KeyAscii), 0, , , vbTrue)

Else
MsgBox$ MyCaption(31)

End If

KeyAscii = 0

End Sub