Sub HeutigesDatumEintragen Dim Document as Object Dim Sheet as Object Dim Cell As Object Document = ThisComponent Sheet = Document.currentcontroller.activesheet Document=thisComponent Sheet = Document.currentcontroller.activesheet Cell=Document.getCurrentSelection().getCellAddress() Row=Cell.Row ' aktuelle Spalte, Index Col=Cell.Column Cell = Sheet.getCellByPosition(Col, Row) Cell.NumberFormat = 37 ' Datum 31.12.99 Cell.Value = cdate( date() & " " & Time ) End Sub