Propiedad Validation.ErrorMessage (Excel)

Devuelve o establece el mensaje de error de validación de datos. String de lectura y escritura.

Sintaxis

expresión. Errormessage

Expresión Variable que representa un objeto Validation .

Ejemplo:

En este ejemplo se agrega validación de datos a la celda E5 y se especifican los mensajes de entrada y de error.

With Range("e5").Validation 
 .Add Type:=xlValidateWholeNumber, _ 
 AlertStyle:= xlValidAlertStop, _ 
 Operator:=xlBetween, Formula1:="5", Formula2:="10" 
 .InputTitle = "Integers" 
 .ErrorTitle = "Integers" 
 .InputMessage = "Enter an integer from five to ten" 
 .ErrorMessage = "You must enter a number from five to ten" 
End With

Soporte técnico y comentarios

¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.