[Libreoffice-bugs] [Bug 143211] Better example macro
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Jul 6 18:05:47 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=143211
--- Comment #5 from Rafael Lima <rafael.palma.lima at gmail.com> ---
It makes sense... LO does not evaluate the formula before validating cell
content.
My only concern about using "CellFormula" instead of "CellValue" is that it
would cause the same confusion in users. Maybe they'll start thinking LO should
evaluate formulas before validating the cell value.
How about we use the proposed code, but keeping CellValue to avoid confusion?
Hence, the new example would be:
Function ExampleValidity(CellValue as String, TableCell as String) as Boolean
Dim msg as string
Dim iAnswer as integer
Dim MB_FLAGS as integer
msg = "Invalid value: " & "'" & CellFormula & "'"
msg = msg & " in table: " & "'" & TableCell & "'"
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
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210706/5e8be914/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list