REM ***** BASIC ***** 'Code for LXF84: OOo VBA interoperability Option VBASupport 1 'Option Explicit Sub Main 'writeToCell_mixed bigFreeze End Sub Sub writeToCell_VBA sheets("Sheet1").select cells(1,1).value="Hello world" End Sub Sub writeToCell_OOo dim sheet as object dim cell as object sheet=thisComponent.sheets(0) cell=sheet.getCellByPosition(0,1) cell.string="Hello World Again" End Sub Sub writeToCell_minimum thisComponent.sheets(0).getCellByPosition(0,1).string="Last One" End Sub Sub bigFreeze Application.ScreenUpdating = False 'VBA format ThisComponent.Sheets.getByName("Sheet1").getCellRangeByName("B1:E5").clearContents( _ com.sun.star.sheet.CellFlags.VALUE _ + com.sun.star.sheet.CellFlags.STRING _ + com.sun.star.sheet.CellFlags.DATETIME _ + com.sun.star.sheet.CellFlags.ANNOTATION _ + com.sun.star.sheet.CellFlags.FORMULA _ + com.sun.star.sheet.CellFlags.HARDATTR _ + com.sun.star.sheet.CellFlags.STYLES _ + com.sun.star.sheet.CellFlags.OBJECTS _ + com.sun.star.sheet.CellFlags.EDITATTR) Range("A1:E5").ClearContents Range("B1").Value = 12 ThisComponent.CurrentController.ActiveSheet.getCellRangeByName("B2").Value = 12 ThisComponent.UnlockControllers 'OOo format End Sub