https://bugs.freedesktop.org/show_bug.cgi?id=64048
Priority: medium
Bug ID: 64048
Assignee: [email protected]
Summary: FORMATTING: clearcontents in VBA code clears formats
Severity: normal
Classification: Unclassified
OS: Windows (All)
Reporter: [email protected]
Hardware: Other
Whiteboard: BSA
Status: UNCONFIRMED
Version: 4.0.2.2 release
Component: Spreadsheet
Product: LibreOffice
Problem description:
In VBA code, the "ClearContents" method on a VBA range object clears cell
formatting. It should not: in VBA, ClearContents
Steps to reproduce:
1. Open a .xls file with macros
2. Give cell B10 some text and pretty formatting.
3. Add the following macro to the VBAProject:
sub Test ()
range("b10").clearcontents
end sub
3. Run the macro. The text and formatting both disappear.
Current behavior:
In VBA code, the "ClearContents" method on a VBA range object clears cell
formatting.
Expected behavior:
In VBA, ClearContents clears values (of any type) and formulas, but not cell
formats.
This bug is frustrating because I can't find any way to clear cell contents
that works in both Excel and LibreOffice. The Star Basic
clearcontents(CellFlags) doesn't work on VBA Range objects, and LibreOffice
does not clear cell contents if I assign "Null" to them, as Excel does.
Operating System: Windows XP
Version: 4.0.2.2 release
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs