Code: Alles auswählen
Sub RedTab()
oCalc = ThisComponent
oSheet = oCalc.Sheets(0)
oSheet.unprotect("Kennwort")
oSheet.TabColor = RGB(255,0,0)
oSheet.protect("Kennwort")
End Sub

Danke für die Hilfe.
Asterix
Code: Alles auswählen
Sub RedTab()
oCalc = ThisComponent
oSheet = oCalc.Sheets(0)
oSheet.unprotect("Kennwort")
oSheet.TabColor = RGB(255,0,0)
oSheet.protect("Kennwort")
End Sub