StarBasic FAQWissen, das weiterhilft.

Makros und Tools

Zellenschutz

Stellt den Schutzstatus einer Calc-Zelle ein. Achtung die Tabelle selber darf nicht geschützt sein.

Basic
sub Zellschutz(myCell as Object, gesperrt as boolean, formelhidden as boolean,ausblenden as boolean,druck as boolean)
   Dim myProtection As New com.sun.star.util.CellProtection
   myProtection.IsLocked=gesperrt
   myProtection.IsFormulaHidden=formelhidden
   myProtection.IsHidden=ausblenden
   myProtection.IsPrintHidden=druck
   myCell.CellProtection=myProtection
end sub