Created attachment 158975 [details] Example file from Excel Attached file contains a simple macro to set cell borders. This call does not work in Calc: Cells(2, 1).Font.Color = vbRed Steps to reproduce: 1. Open attached xlsm file 2. Run the macro in Excel and Calc Actual results: A2 cell text becomes red in Excel but stays default in Calc. Expected results: A2 cell text becomes red in Calc. LibreOffice details: Version: 7.0.0.0.alpha0+ (x64) Build ID: bc898e2c2784e36ad4d4cdf6d962e39069d2c82d CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; Locale: hu-HU (hu_HU); UI-Language: en-US Calc: CL Also happens in LibreOffice 3.5.0rc3 Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Created attachment 158976 [details] Screenshot of the original document side by side in Excel and Calc after running the macro
Rem Attribute VBA_ModuleType=VBADocumentModule Option Explicit Option VBASupport 1 Sub FontColor() Cells(2, 1) = "Hello World" Cells(2, 1).Font.Color= &H00FF End Sub vbRed not defined?
https://opengrok.libreoffice.org/xref/core/basic/source/comp/parser.cxx?r=f853ec31#844
Reproduced in Version: 7.0.0.0.alpha0+ Build ID: 9163755e9f64a0b1dd5f2090e0702c19e31c12c9 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded
forgot to mention another source of constants and enums( but this is not so related to this bug itself. It's just FYI) https://opengrok.libreoffice.org/xref/core/basic/source/runtime/stdobj.cxx?r=62f3f3d9#332
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d6063f416c78f30f1fb717f3ab05f9691bb3461d tdf#131563 - Add vba color constants It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thx himajin for the code pointer!
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/d765faacd1933c091e9eb0ecd566460beeb2a33d tdf#131563 - Add vba color constants It will be available in 7.2.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Alain Romedenne committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/cae1ccb6137d03cada0e187756e9197a897ba94b tdf#131563 VBA color constants