Alerta de fallos
Define'l mensaxe de fallu qu'ha amosase al introducir datos incorreutos nuna caxella.
Tamién pue executase una macro con un mensaxe de fallu. A la fin d'esta páxina amuésase una macro d'exemplu.
Amosar mensaxe de fallu al entrar valores incorrectos
Amuesa'l mensaxe de fallu que s'introduz na seición Conteníu al ingresar datos inválidos nuna caxella. El mensaxe amosar pa prevenir l'ingresu de datos inválidos cuando ta habilitada esta opción.
En dambos casos, si escueye la opción "Detener" la entrada incorrecta bórrase y restablezse na caxella'l valor anterior. Lo mesmo asocede si zarra los diálogos "Alvertencia" y "Información" calcando'l botón Encaboxar. Si zarra los diálogos col botón Aceutar, la entrada incorrecta nun se desaniciar.
Conteníos
Aición
Escueya l'aición que deseye que tenga llugar al introducir datos incorrectos nuna caxella. L'aición "Detener" refuga la entrada incorrecta y amuesa un diálogu que se debe zarrar calcando Aceutar. Les acciones "Alvertencia" y "Información" amuesen un diálogu que pue zarrase calcando Aceutar o Encaboxar. La entrada incorrecta namái se refuga si faise clic en Encaboxar.
-
The Stop action rejects the invalid entry and displays a dialog that you have to close by clicking OK.
-
The Warning and Information actions display a dialog that can be closed by clicking OK or Cancel. The invalid entry is only rejected when you click Cancel.
-
The Reject Silently action keeps the current cell value and does not display a dialog.
Restolar
Abre'l diálogu Macro, onde pue escoyer la macro que se va executar al introducir datos incorrectos nuna caxella. La macro execútase dempués d'amosar el mensaxe de fallu.
Títulu
Escriba'l títulu de la macro o'l mensaxe de fallu que deseya que s'amuese al introducir datos incorrectos nuna caxella.
Mensaxe de fallu
Escriba'l mensaxe que deseya que s'amuese al introducir datos incorrectos nuna caxella.
Sample macro:
Below is a sample function that can be called when an error occurs. Note that the macro takes in two parameters that are passed on by Collabora Office when the function is called:
-
CellValue: The value entered by the user, as a String.
-
CellAddress: The address of the cell where the value was entered, as a String prefixed with the sheet name (e.g: "Sheet1.A1").
The function must return a Boolean value. If it returns True, the entered value is kept. If the function returns False, the entered value is erased and the previous value is restored.
Function ExampleValidity(CellValue as String, CellAddress as String) as Boolean
Dim msg as String
Dim iAnswer as Integer
Dim MB_FLAGS as Integer
msg = "Invalid value: " & "'" & CellValue & "'"
msg = msg & " in cell: " & "'" & CellAddress & "'"
msg = msg & Chr(10) & "Accept anyway?"
MB_FLAGS = MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON2
iAnswer = MsgBox (msg , MB_FLAGS, "Mensaxe d'error")
ExampleValidity = (iAnswer = IDYES)
End Function