| Summary: | Cannot set cell font color from VBA macro | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | NISZ LibreOffice Team <libreoffice> |
| Component: | BASIC | Assignee: | Andreas Heinisch <andreas.heinisch> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nemeth, xiscofauli |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:7.3.0 target:7.2.3 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 108908 | ||
| Attachments: |
Example file from Excel
Screenshot of the original document side by side in Excel and Calc after running the macro |
||
|
Description
NISZ LibreOffice Team
2020-03-25 11:46:21 UTC
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? 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 |