Dim texto As String texto = text1.Text If Len(texto) <> 4 Then MsgBox "Eltexto debe ser igual a 4" End If MsgBox Len(texto)