It appears that the document (color) themes breaks macro recording when assigning color to a spreadsheet cell. (I watched the Tea Time Training with Tomasz Jan 16, 2026) The macro recorded below does not work, message is "BASIC syntax error. Unexpected symbol: CRLF." sub zz rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "ToPoint" args1(0).Value = "$E$9" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(1) as new com.sun.star.beans.PropertyValue args2(0).Name = "BackgroundColor.Color" args2(0).Value = 6472704 args2(1).Name = "BackgroundColor.ComplexColorJSON" args2(1).Value = "{ "+CHR$(34)+"ThemeIndex"+CHR$(34)+": -1, "+CHR$(34)+"Transformations"+CHR$(34)+": [ ]}" dispatcher.executeDispatch(document, ".uno:BackgroundColor", "", 0, args2()) end sub
Sorry... issue was elswehere.