LibreOffice 24.8 Help
Defines the error message that is displayed when invalid data is entered in a cell.
μ€λ₯ λ©μμ§μ ν¨κ» 맀ν¬λ‘λ₯Ό μμν μλ μμ΅λλ€. μ΄ νμ΄μ§μ λμμ μν 맀ν¬λ‘κ° μ 곡λ©λλ€.
μ¬λ°λ₯΄μ§ μμ λ°μ΄ν°κ° μ μ μ λ ₯λμμ λ λ΄μ© μμμ μ λ ₯ν μ€λ₯ λ©μμ§λ₯Ό νμν©λλ€. μ΄λ₯Ό μ¬μ©νλ©΄ μλͺ»λ μ λ ₯μ λ°©μ§νλ λ©μμ§κ° νμλ©λλ€.
μ΄λ ν κ²½μ°λ "μ μ§"λ₯Ό μ ννλ©΄ μλͺ»λ νλͺ©μ΄ μμ λκ³ μ΄μ κ°μ΄ μ μ λ€μ μ λ ₯λ©λλ€. μ΄λ μ·¨μ λ²νΌμ λλ¬ "κ²½κ³ " λ° "μ 보" λν μμλ₯Ό λ«μ κ²½μ°μλ λμΌνκ² μ μ©λ©λλ€. νμΈ λ²νΌμ λλ¬ λν μμλ₯Ό λ«μ κ²½μ°μλ μλͺ»λ νλͺ©μ΄ μμ λμ§ μμ΅λλ€.
μλͺ»λ λ°μ΄ν°κ° μ μ μ λ ₯λ λ μνν μλμ μ νν©λλ€. "μ μ§" μλμ μλͺ»λ νλͺ©μ κ±°λΆνκ³ νμΈμ λλ¬ λ«μμΌ νλ λν μμλ₯Ό νμν©λλ€. "κ²½κ³ " λ° "μ 보" μλμ νμΈ λλ μ·¨μλ₯Ό λλ¬ λ«μ μ μλ λν μμλ₯Ό νμν©λλ€. μλͺ»λ νλͺ©μ μ·¨μλ₯Ό λλ₯Ό κ²½μ°μλ§ κ±°λΆλ©λλ€.
μλͺ»λ λ°μ΄ν°κ° μ μ μ λ ₯λ κ²½μ° μ€νν 맀ν¬λ‘λ₯Ό μ νν μ μλ 맀ν¬λ‘ λν μμλ₯Ό μ½λλ€. 맀ν¬λ‘λ μ€λ₯ λ©μμ§κ° νμλ νμ μ€νλ©λλ€.
μλͺ»λ λ°μ΄ν°κ° μ μ μ λ ₯λ κ²½μ° νμν 맀ν¬λ‘ λλ μ€λ₯ λ©μμ§μ μ λͺ©μ μ λ ₯ν©λλ€.
μλͺ»λ λ°μ΄ν°κ° μ μ μ λ ₯λ κ²½μ° νμν λ©μμ§λ₯Ό μ λ ₯ν©λλ€.
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 LibreOffice 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, "Error message")
ExampleValidity = (iAnswer = IDYES)
End Function